杭电2025

来源:互联网 发布:淘宝买药可靠吗 编辑:程序博客网 时间:2024/05/19 19:14
#include<iostream>
#include<string>
using namespace std;
int main()
{
            string str;
            while(cin>>str)
            {
                        char a;
                        a=str[0];
                        int i=0;
                        while(str[i]!='\0')
                        {
                                   if(str[i]>a)
                                   a=str[i];
                                   i++;
                        }
                        i=0;
                       while(str[i]!=0)
                       {
                                  cout<<str[i];
                                  if(str[i]==a)
                                  cout<<"(max)";
                                  i++;
                      }
                      cout<<endl;
            }

}


原创粉丝点击