- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBingo.java
More file actions
Latest commit
28 lines (28 loc) · 764 Bytes
/
Copy pathBingo.java
File metadata and controls
28 lines (28 loc) · 764 Bytes
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
importjava.util.*;
publicclassECCPR{
publicstaticvoidmain(String []args){
intk,n,nr;
Scannersc=newScanner(System.in);
k=sc.nextInt();
n=sc.nextInt();
ArrayList<Integer>list=newArrayList<Integer>();
for(inti=0;i<k*k;i++){
nr=sc.nextInt();
list.add(nr);
}
for(inti=0;i<n;i++){
nr=sc.nextInt();
for(intj=0;j<list.size();){
if(list.get(j)==nr){
list.remove(j);
}elsej++;
}
}
intsuma=0;
if(list.size()==0){
System.out.print("BINGO!");
}else{
System.out.print(list.size());
}
}
}