当前位置:网站首页>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.");
}
}
}
}
结果:
边栏推荐
- 软件测试基本流程有哪些?北京专业第三方软件检测机构安利
- MySQL使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段
- DDR4内存条电路设计
- tf中自减操作;tf.assign_sub()
- 【软件测试】(北京)字节跳动科技有限公司终面HR面试题
- Pinduoduo API interface
- Daily sql: request for friend application pass rate
- daily sql - query for managers and elections with at least 5 subordinates
- Go语言实现Etcd服务发现(Etcd & Service Discovery & Go)
- Redis源码:Redis源码怎么查看、Redis源码查看顺序、Redis外部数据结构到Redis内部数据结构查看源码顺序
猜你喜欢

《猪猪1984》NFT 作品集将上线 The Sandbox 市场平台

1688 product interface

Pinduoduo API interface

SQL sliding window

Attitude solution - gyroscope + Euler method

Tidb二进制集群搭建

Implementation of FIR filter based on FPGA (5) - FPGA code implementation of parallel structure FIR filter

Douyin get douyin share password url API return value description

mysql视图与索引

Pico neo3在Unity中的交互操作
随机推荐
2022-08-10 Group 4 Self-cultivation class study notes (every day)
详述 MIMIC护理人员信息表(十五)
Depth (relay supervision)
Edge 提供了标签分组功能
Shell:三剑客之awk
JVM学习——3——数据一致性
jar服务导致cpu飙升问题-带解决方法
redis操作
技术分享 | 实战演练接口自动化如何处理 Form 请求?
mysql视图与索引
Attitude solution - gyroscope + Euler method
Daily sql-seek the sum of successful investments in 2016
NFT 的价值从何而来
基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
从 dpdk-20.11 移植 intel E810 百 G 网卡 pmd 驱动到 dpdk-16.04 中
How Unity handles C# under the hood
基于FPGA的FIR滤波器的实现(4)— 串行结构FIR滤波器的FPGA代码实现
A used in the study of EEG ultra scanning analysis process
机器学习总结(二)
js根据当天获取前几天的日期