mirror of
https://github.com/Kiritow/OJ-Problems-Source.git
synced 2024-03-22 13:11:29 +08:00
24 lines
435 B
C++
24 lines
435 B
C++
|
#include <stdio.h>
|
||
|
int main(void)
|
||
|
{
|
||
|
char t[128];
|
||
|
char max;
|
||
|
int i;
|
||
|
while (gets(t))
|
||
|
{
|
||
|
for (max = i = 0 ; t[i] ; i++)
|
||
|
{
|
||
|
if (t[i] > max)
|
||
|
max = t[i];
|
||
|
}
|
||
|
for (i = 0 ; t[i] ; i++)
|
||
|
{
|
||
|
putchar(t[i]);
|
||
|
if (t[i] == max)
|
||
|
printf("%s", "(max)");
|
||
|
}
|
||
|
putchar('\n');
|
||
|
}
|
||
|
return 0;
|
||
|
}
|