当前位置:网站首页>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.cast(), reduce_min(), reduce_max()
1061 判断题 (15 分)
Pico neo3在Unity中的交互操作
技术分享 | 实战演练接口自动化如何处理 Form 请求?
Discourse 的关闭主题(Close Topic )和重新开放主题
数仓开发知识总结
6月各手机银行活跃用户较快增长,创半年新高
基于FPGA的FIR滤波器的实现(4)— 串行结构FIR滤波器的FPGA代码实现
[Recommender System]: Overview of Collaborative Filtering and Content-Based Filtering
随机推荐
基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
jar服务导致cpu飙升问题-带解决方法
Redis source code: how to view the Redis source code, the order of viewing the Redis source code, the sequence of the source code from the external data structure of Redis to the internal data structu
Edge 提供了标签分组功能
How do you optimize the performance of your Unity project?
3.1-分类-概率生成模型
When MySQL uses GROUP BY to group the query, the SELECT query field contains non-grouping fields
线程交替输出(你能想出几种方法)
1051 Multiplication of Complex Numbers (15 points)
动态代理学习
【sdx62】XBL设置共享内存变量,然后内核层获取变量实现
JVM学习——3——数据一致性
技术分享 | 实战演练接口自动化如何处理 Form 请求?
【Pytorch】nn.Linear,nn.Conv
Redis源码-String:Redis String命令、Redis String存储原理、Redis字符串三种编码类型、Redis String SDS源码解析、Redis String应用场景
4.1-支持向量机
matplotlib
golang fork 进程的三种方式
1046 划拳 (15 分)
1002 写出这个数 (20 分)