-
Notifications
You must be signed in to change notification settings - Fork 0
/
19mock J4
41 lines (39 loc) · 990 Bytes
/
19mock J4
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
import java.io.*;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = yes.nextInt();
int dtb = 0;
int bb = 0;
int s = 0;
int rb = 0;
for(int i=0; i<=n; i++){
String f = sc.nextLine();
if(f.equals("Deluxe Tuna Bitz")){
dtb++;
}
if(f.equals("Bonito Bitz")){
bb++;
}
if(f.equals("Sashimi")){
s++;
}
if(f.equals("Ritzy Bitz")){
rb++;
}
}
if(dtb>0){
System.out.println("Deluxe Tuna Bitz"+" "+dtb);
}
if(bb>0){
System.out.println("Bonito Bitz"+" "+bb);
}
if(s>0){
System.out.println("Sashimi"+" "+s);
}
if(rb>0){
System.out.println("Ritzy Bitz"+" "+rb);
}
}
}