我这个为什么过不了 public static void main(String[] args) {         Scanner input = new Scanner(System.in);         Set<String> set = new HashSet<>();         String str;         int count = 0;         while(input.hasNextLine() && count <= 50) {             ++ count;             str = input.nextLine();             if(str == null || str.equals("")) break;             String tmp [] = str.split(" ");             for (String s : tmp) set.add(s);         }         System.out.println(set.size());         set.clear();     }
点赞 评论

相关推荐

05-05 21:45
已编辑
广州大学 Java
点赞 评论 收藏
分享
自由水:这HR已经很好了,多的是已读不回和不读了
点赞 评论 收藏
分享
牛客网
牛客企业服务