不知道为什么 第一题这样写只有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]+$"); } } 有大佬说说问题 吗
点赞 评论

相关推荐

2025-12-25 16:26
已编辑
河北科技学院 Java
勇敢的牛油不服输:2800-300那不等于2500一个月吗兄弟们
点赞 评论 收藏
分享
牛客网
牛客网在线编程
牛客网题解
牛客企业服务