import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); char[]c={'~','!','@','#','$','%','^' }; int N=sc.nextInt(); for (int i = 0; i < N; i++) { String s=sc.next(); int count=0; if(isConUpper(s)) count++; if(isConLower(s)) count++; if(isConNumber(s)) count++; if(count==3){ System.out.println("YES"); } else{ for (int j = 0; j < c.length; j++) { if(s.contains(c[j]+"")){ count++; break;} } if(count==3) System.out.println("YES"); else System.out.println("NO"); } } } static boolean isConUpper(String s){ for (int i = 0; i < s.length(); i++) { if(s.charAt(i)>='A'&&s.charAt(i)<='Z')return true; } return false; } static boolean isConLower(String s){ for (int i = 0; i < s.length(); i++) { if(s.charAt(i)>='a'&&s.charAt(i)<='z') return true; } return false; } static boolean isConNumber(String s){ for (int i = 0; i < s.length(); i++) { if(s.charAt(i)>='0'&&s.charAt(i)<='9') return true; } return false; } }
0.0分
1 人评分
C语言程序设计教程(第三版)课后习题12.5 (C语言代码)浏览:820 |
【亲和数】 (C语言代码)浏览:538 |
【绝对值排序】 (C++代码)浏览:670 |
C语言程序设计教程(第三版)课后习题1.5 (C语言代码)浏览:586 |
sizeof的大作用 (C语言代码)浏览:1448 |
循环入门练习5 (C语言代码)浏览:829 |
2003年秋浙江省计算机等级考试二级C 编程题(1) (C语言代码)浏览:667 |
C语言程序设计教程(第三版)课后习题8.2 (C语言代码)浏览:1028 |
拆分位数 (C语言代码)浏览:514 |
C语言训练-列出最简真分数序列* (C语言代码)浏览:594 |