-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathI067.java
29 lines (27 loc) · 875 Bytes
/
I067.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
package levelB;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class I067 {
public static void main(String[] args) throws Exception {
BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
String[] str=br.readLine().split(" ");
String correct=str[0];
int N=Integer.parseInt(str[1]);
int count=0;
while(true){
String temp=br.readLine();
if(temp.equals("#"))
break;
count++;
if(temp.equals(correct)){
System.out.println("Welcome in");
break;
}else
System.out.println("Wrong password: "+temp);
if(count>=N){
System.out.println("Account locked");
break;
}
}
}
}