acm2025

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/a736933735/article/details/44515499
/**
 * 在最大值后面加max
 */
import java.io.*;
import java.util.*;
public class acm2025 {

public static void main(String[] args) {
Scanner in = new Scanner(new BufferedInputStream(System.in));
String str = null;
while(in.hasNext()) {
str = in.next();
char c = str.charAt(0);
for(int i=1; i<str.length(); i++) {
if(c < str.charAt(i)) {
c = str.charAt(i);
}
}
for(int i=0; i<str.length(); i++) {
System.out.print(str.charAt(i));
if(str.charAt(i) == c) {
System.out.print("(max)");
}
}
System.out.println();
}
}
}

猜你喜欢

转载自blog.csdn.net/a736933735/article/details/44515499