标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)abcdefgfedcba xxxxx
abcdefg(max)fedcba x(max)x(max)x(max)x(max)x(max)#include<string.h> int main() { char a[101]; int i,m,j; while(gets(a)) { m=a[0]; j=strlen(a); for(i=0;i<j;i++) { m=m>a[i+1]?m:a[i+1]; } for(i=0;i<j;i++) { if(a[i]==m) printf("%c(max)",a[i]); else printf("%c",a[i]); } printf("\n"); } return 0; }
标签:
原文地址:http://blog.csdn.net/l15738519366/article/details/45692463