当前位置:网站首页>1081 检查密码 (15 分)
1081 检查密码 (15 分)
2022-08-11 06:46:00 【呆比特】
题目要求:

代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
sc.nextLine();
for (int i = 0; i < n; i++) {
String s = sc.nextLine();
if (s.length() < 6){
System.out.println("Your password is tai duan le.");
continue;
}else if (!s.matches("[a-zA-Z0-9.]+")){
System.out.println("Your password is tai luan le.");
continue;
}else if (!s.matches(".*[0-9].*")){
System.out.println("Your password needs shu zi.");
continue;
}else if (!s.matches(".*[a-zA-Z].*")){
System.out.println("Your password needs zi mu.");
continue;
}else {
System.out.println("Your password is wan mei.");
}
}
}
}
结果:
边栏推荐
- pytorch,numpy两种方法实现nms类间+类内
- Pinduoduo API interface
- Unity开发者必备的C#脚本技巧
- Douyin API interface
- What are the things that should be planned from the beginning when developing a project with Unity?How to avoid a huge pit in the later stage?
- 一张图了解JVM八大原子操作
- 详述MIMIC 的ICU患者检测时间信息表(十六)
- Edge provides label grouping functionality
- Find the shops that have sold more than 1,000 yuan per day for more than 30 consecutive days in the past six months
- 【软件测试】(北京)字节跳动科技有限公司终面HR面试题
猜你喜欢
随机推荐
jar服务导致cpu飙升问题-带解决方法
【LaTex-错误和异常】\verb ended by end of line.原因是因为闭合边界符没有在\verb命令所属行中出现;\verb命令的正确和错误用法、verbatim环境的用法
囍楽云任务源码
你是如何做好Unity项目性能优化的
LeetCode brushing series -- 46. Full arrangement
matplotlib
DDR4内存条电路设计
Unity游戏排行榜的制作与优化
Coordinate system in navigation and positioning
Douyin API interface
TF中的One-hot
TF中的四则运算
Redis测试
JVM学习——3——数据一致性
【sdx62】XBL设置共享内存变量,然后内核层获取变量实现
Spatial Pyramid Pooling -Spatial Pyramid Pooling (including source code)
How do you optimize the performance of your Unity project?
【深度学习】什么是互信息最大化?
Depth (relay supervision)
数仓开发知识总结









