当前位置:网站首页>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视图与索引
- 囍楽云任务源码
- 6月各手机银行活跃用户较快增长,创半年新高
- 那些事情是用Unity开发项目应该一开始规划好的?如何避免后期酿成巨坑?
- Attitude solution - gyroscope + Euler method
- Multiscale communication in cortical-cortical networks
- 一张图了解JVM八大原子操作
- tf中自减操作;tf.assign_sub()
- Strongly recommend an easy-to-use API interface
- Amazon Get AMAZON Product Details API Return Value Description
猜你喜欢
伦敦银规则有哪些?
unable to extend table xxx by 1024 in tablespace xxxx
prometheus学习5altermanager
Redis源码:Redis源码怎么查看、Redis源码查看顺序、Redis外部数据结构到Redis内部数据结构查看源码顺序
技能在赛题解析:交换机防环路设置
Edge provides label grouping functionality
easyrecovery15数据恢复软件收费吗?功能强大吗?
Pinduoduo API interface (attach my available API)
下一代 无线局域网--强健性
【推荐系统】:协同过滤和基于内容过滤概述
随机推荐
tf中矩阵乘法
Daily sql-seek the sum of successful investments in 2016
1688 product interface
Edge provides label grouping functionality
Implementation of FIR filter based on FPGA (5) - FPGA code implementation of parallel structure FIR filter
公牛10-11德里克·罗斯最强赛季记录
【sdx62】XBL设置共享内存变量,然后内核层获取变量实现
年薪40W测试工程师成长之路,你在哪个阶段?
SQL滑动窗口
2022年中国软饮料市场洞察
JD.com product details API call example explanation
Taobao sku API interface (PHP example)
Implement general-purpose, high-performance sorting and quicksort optimizations
一张图了解JVM八大原子操作
matplotlib
Get Pinduoduo product information operation details
golang fork 进程的三种方式
《猪猪1984》NFT 作品集将上线 The Sandbox 市场平台
ROS 话题通信理论模型
Redis + lua implements distributed interface current limiting implementation scheme