Codeforces 236A.Boy or Girl
作者:互联网
import java.util.HashSet; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String str = scanner.next(); HashSet<Character> hashSet = new HashSet<>(); for (int i = 0; i < str.length(); i++) { hashSet.add(str.charAt(i)); } int num = hashSet.size(); if ((num % 2 ) == 1) { System.out.println("IGNORE HIM!"); }else { System.out.println("CHAT WITH HER!"); } } }
标签:Boy,Scanner,hashSet,HashSet,Codeforces,System,str,Girl,scanner 来源: https://www.cnblogs.com/csw2021/p/16399113.html