当前位置:网站首页>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.");
}
}
}
}
结果:
边栏推荐
猜你喜欢

从何跟踪伦敦金最新行情走势?

EasyPlayer针对H.265视频不自动播放设置下,loading状态无法消失的解决办法

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

接口测试的基础流程和用例设计方法你知道吗?

恒源云-Pycharm远程训练避坑指南

Douyin share password url API tool

Daily sql-statistics of the number of professionals (including the number of professionals is 0)

Shell:三剑客之awk

【LaTex-错误和异常】\verb ended by end of line.原因是因为闭合边界符没有在\verb命令所属行中出现;\verb命令的正确和错误用法、verbatim环境的用法

Pinduoduo API interface (attach my available API)
随机推荐
第一个C函数:如何实现板级初始化?
STM32CUBEIDE(11)----输出PWM及修改PWM频率与占空比
PIXHAWK飞控使用RTK
李沐d2l(十)--卷积层Ⅰ
linux 安装mysql服务报错
TF中的条件语句;where()
Service的两种状态形式
【@网络工程师:用好这6款工具,让你的工作效率大翻倍!】
囍楽云任务源码
从何跟踪伦敦金最新行情走势?
技术分享 | 实战演练接口自动化如何处理 Form 请求?
SQL sliding window
MySQL使用GROUP BY 分组查询时,SELECT 查询字段包含非分组字段
Daily sql-employee bonus filtering and answer rate ranking first
daily sql - user retention rate for two days
radix-4 FFT principle and C language code implementation
What are the things that should be planned from the beginning when developing a project with Unity?How to avoid a huge pit in the later stage?
年薪40W测试工程师成长之路,你在哪个阶段?
ROS 话题通信理论模型
tf中矩阵乘法