You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
407 B
C++

#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main()
{
string s;
while(cin>>s)
{
char ch=*max_element(s.begin(),s.end());
string ans;
for(size_t i=0; i<s.size(); i++)
{
ans+=s[i];
if(s[i]==ch)
ans+="(max)";
}
cout<<ans<<endl;
}
return 0;
}