当前位置:网站首页>1081 Check Password (15 points)
1081 Check Password (15 points)
2022-08-11 07:48:00 【dumb bit】
题目要求:

代码:
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.");
}
}
}
}
结果:
边栏推荐
猜你喜欢
随机推荐
一张图了解JVM八大原子操作
技能在赛题解析:交换机防环路设置
Service的两种状态形式
为什么我使用C#操作MySQL进行中文查询失败
js根据当天获取前几天的日期
【latex异常和错误】Missing $ inserted.<inserted text>You can‘t use \spacefactor in math mode.输出文本要注意特殊字符的转义
NFT 的价值从何而来
tf.cast(),reduce_min(),reduce_max()
1002 写出这个数 (20 分)
为什么C#中对MySQL不支持中文查询
基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
1046 划拳 (15 分)
Tensorflow中使用tf.argmax返回张量沿指定维度最大值的索引
prometheus学习5altermanager
buu—Re(5)
oracle19c does not support real-time synchronization parameters, do you guys have any good solutions?
1002 Write the number (20 points)
Serverless + domain name can also build a personal blog? Really, and soon
恒源云-Pycharm远程训练避坑指南
【Pytorch】nn.Linear,nn.Conv








