当前位置:网站首页>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.");
}
}
}
}
结果:
边栏推荐
- tf中矩阵乘法
- Tidb二进制集群搭建
- 详述 MIMIC护理人员信息表(十五)
- 1076 Wifi密码 (15 分)
- Internet phone software or consolidation of attack must be "free" calls security clearance
- Waldom Electronics宣布成立顾问委员会
- Service的两种启动方式与区别
- 【latex异常和错误】Missing $ inserted.<inserted text>You can‘t use \spacefactor in math mode.输出文本要注意特殊字符的转义
- Tf中的平方,多次方,开方计算
- 计算YUV文件的PSNR与SSIM
猜你喜欢
随机推荐
NFT 的价值从何而来
软件测试基本流程有哪些?北京专业第三方软件检测机构安利
基于FPGA的FIR滤波器的实现(4)— 串行结构FIR滤波器的FPGA代码实现
博途PLC 1200/1500PLC ModbusTcp通信梯形图优化汇总(多服务器多从站轮询)
1091 N-Defensive Number (15 points)
【@网络工程师:用好这6款工具,让你的工作效率大翻倍!】
Service的两种启动方式与区别
3.2-分类-Logistic回归
Unity开发者必备的C#脚本技巧
基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
技能在赛题解析:交换机防环路设置
【Pytorch】nn.ReLU(inplace=True)
JVM学习——3——数据一致性
Strongly recommend an easy-to-use API interface
Unity底层是如何处理C#的
Tidb二进制集群搭建
Redis源码-String:Redis String命令、Redis String存储原理、Redis字符串三种编码类型、Redis String SDS源码解析、Redis String应用场景
【latex异常和错误】Missing $ inserted.<inserted text>You can‘t use \spacefactor in math mode.输出文本要注意特殊字符的转义
buu—Re(5)
pytorch,numpy两种方法实现nms类间+类内