题解 | #字符个数统计#
字符个数统计
https://www.nowcoder.com/practice/eb94f6a5b2ba49c6ac72d40b5ce95f50
public class Main {
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(System.in);
String a = scanner.nextLine();
char [] b = a.toCharArray();
HashSet set = new HashSet();
for (int i = 0; i < b.length; i++) {
set.add(b[i]);
}
System.out.print(set.size());
}
}
#java求职#
public static void main(String[] args) throws IOException {
Scanner scanner = new Scanner(System.in);
String a = scanner.nextLine();
char [] b = a.toCharArray();
HashSet set = new HashSet();
for (int i = 0; i < b.length; i++) {
set.add(b[i]);
}
System.out.print(set.size());
}
}
#java求职#