陈旺


私信TA

用户名:cw0824ly

访问量:9695

签 名:

等  级
排  名 121
经  验 7543
参赛次数 2
文章发表 61
年  龄 18
在职情况 学生
学  校 湖北生物科技职业学院
专  业

  自我简介:

TA的其他文章

import java.util.Scanner;

public class Dome21 {
   public static void main(String[] args) {
      Scanner scanner = new Scanner(System.in);
      int M = scanner.nextInt();
      for (int i = 0; i < M; i++) {
         String str = scanner.next();
         if (str.length() >= 8 && str.length() <= 16) {
            int count = 0;
            if (str.matches(".*[~!@#$%^].*"))
               count++;
            if (str.matches(".*[a-z].*"))
               count++;
            if (str.matches(".*[A-Z].*"))
               count++;
            if (str.matches(".*\\d.*"))
               count++;
            if (count>=3)
               System.out.println("YES");
            else
               System.out.println("NO");
         } else {
            System.out.println("NO");
         }
      }
   }
}


 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区