解题思路:
注意事项:
参考代码:
import java.util.Scanner; public class T1976 { public static int count(String s,char ch){ int count = 0; for(int i = 0;i<s.length();i++){ if(s.charAt(i) == ch) count++; } return count; } public static void main(String[] args) { Scanner in = new Scanner(System.in); while(in.hasNext()){ String s = in.next(); for(int i = 0;i<s.length();i++){ if(count(s,s.charAt(i)) == 1) System.out.print(s.charAt(i)); } System.out.println(); } in.close(); } }
0.0分
0 人评分
三进制小数 (C语言代码)浏览:1025 |
C语言程序设计教程(第三版)课后习题7.3 (C语言代码)浏览:555 |
C语言程序设计教程(第三版)课后习题9.8 (C语言代码)浏览:1205 |
校门外的树 (C语言代码)浏览:1119 |
2004年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:458 |
printf基础练习2 (C语言代码)浏览:567 |
C语言程序设计教程(第三版)课后习题5.6 (C语言代码)浏览:501 |
A+B for Input-Output Practice (III) (C语言代码)浏览:570 |
求圆的面积 (C语言代码)浏览:1669 |
1035 题解浏览:784 |