当前位置:网站首页>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.");
}
}
}
}
结果:
边栏推荐
- 基于FPGA的FIR滤波器的实现(5)— 并行结构FIR滤波器的FPGA代码实现
- Waldom Electronics宣布成立顾问委员会
- DDR4内存条电路设计
- 结合均线分析k线图的基本知识
- tf中自减操作;tf.assign_sub()
- Douyin API interface
- Daily sql-statistics of the number of professionals (including the number of professionals is 0)
- 计算YUV文件的PSNR与SSIM
- Daily sql--statistics the total salary of employees in the past three months (excluding the latest month)
- EasyPlayer针对H.265视频不自动播放设置下,loading状态无法消失的解决办法
猜你喜欢
Strongly recommend an easy-to-use API interface
2022年中国软饮料市场洞察
A used in the study of EEG ultra scanning analysis process
Douyin share password url API tool
【预约观看】Ambire 智能钱包 AMA 活动第四期即将举行
jar服务导致cpu飙升问题-带解决方法
Taobao API common interface and acquisition method
TF通过feature与label生成(特征,标签)集合,tf.data.Dataset.from_tensor_slices
Taobao API interface reference
Taobao product details API interface
随机推荐
Pinduoduo API interface
Daily sql-employee bonus filtering and answer rate ranking first
语音信号处理:预处理【预加重、分帧、加窗】
接口测试的基础流程和用例设计方法你知道吗?
Douyin share password url API tool
MindManager2022全新正式免费思维导图更新
软件测试主要做什么工作,难不难?
redis操作
2022-08-09 Group 4 Self-cultivation class study notes (every day)
Daily sql--statistics the total salary of employees in the past three months (excluding the latest month)
exness:黄金1800关口遇阻,静待美国CPI出炉
Taobao API interface reference
Daily SQL - find each of the students school gpa minimum (window)
jar服务导致cpu飙升问题-带解决方法
Service的两种状态形式
求职简历这样写,轻松搞定面试官
Trill keyword search goods - API
Activity的四种状态
TF中的One-hot
Spatial Pyramid Pooling -Spatial Pyramid Pooling (including source code)