解题思路:
import java.util.Scanner; public class C1232 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); while (sc.hasNext()) { F(sc.nextLine()); } sc.close(); } private static void F(String input){ char[] chs = input.toCharArray(); char max = 'A' - 1; for(char ch : chs){ if(ch > max) max = ch; } System.out.println(input.replaceAll(""+max, ""+max+"(max)")); } }
注意事项:
参考代码:
0.0分
1 人评分
C二级辅导-同因查找 (C语言代码)浏览:565 |
C二级辅导-进制转换 (C语言代码)浏览:514 |
【亲和数】 (C语言代码)浏览:542 |
多输入输出练习1 (C语言代码)浏览:1189 |
【亲和数】 (C语言代码)浏览:860 |
wu-理财计划 (C++代码)浏览:837 |
WU-printf基础练习2 (C++代码)浏览:2007 |
Hello, world! (C++代码)浏览:1745 |
A+B for Input-Output Practice (VI) (C语言代码)浏览:558 |
C语言程序设计教程(第三版)课后习题3.7 (C语言代码)浏览:520 |