-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathI081.java
42 lines (40 loc) · 1.44 KB
/
I081.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
package levelB;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class I081 {
public static void main(String[] args) throws Exception{
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
int N=Integer.parseInt(br.readLine());
for(int i=0;i<N;i++){
char[] c=br.readLine().toUpperCase().toCharArray();
if(c.length<6){
System.out.println("Your password is tai duan le.");
continue;
}
int countLetter=0;
int countNum=0;
boolean flag=false;
for(int j=0;j<c.length;j++){
if(c[j]>='A'&&c[j]<='Z')
countLetter++;
else if(c[j]>='0'&&c[j]<='9')
countNum++;
else if(c[j]!='.'){
flag=true;
break;
}
}
if(flag){
System.out.println("Your password is tai luan le.");
continue;
}else{
if(countNum==0&&countLetter!=0)
System.out.println("Your password needs shu zi.");
else if(countNum!=0&&countLetter==0)
System.out.println("Your password needs zi mu.");
else
System.out.println("Your password is wan mei.");
}
}
}
}