不知道为什么 第一题这样写只有55 public class test2 { public static void main(String[] args) { Scanner in = new Scanner(System.in); int len = in.nextInt(); int count = 0; for(int i= 0; i < len; i++){ String temp = in.nextLine(); if(isReal(temp)){ count++; } } System.out.println(count); } public static boolean isReal(String str){ if(str.length() > 10) return false; return str.matches("^[a-zA-Z]+$"); } } 有大佬说说问题 吗
点赞 评论

相关推荐

Gaynes:查看图片
点赞 评论 收藏
分享
不愿透露姓名的神秘牛友
07-10 12:05
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务