Skip to content

Commit c5d0a1a

Browse files
committed
B
1 parent 4f29627 commit c5d0a1a

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import java.util.Scanner;
2+
3+
public class Main {
4+
public static void main(String[] args) {
5+
Scanner sc = new Scanner(System.in);
6+
7+
int testNum = sc.nextInt();
8+
String[] scoreName = new String[]{"AC", "WA", "TLE", "RE"};
9+
int[] score = new int[4];
10+
11+
for (int i = 0; i < testNum+1; i++) {
12+
String temp = sc.nextLine();
13+
switch (temp) {
14+
case "AC" :
15+
score[0]++;
16+
break;
17+
case "WA" :
18+
score[1]++;
19+
break;
20+
case "TLE" :
21+
score[2]++;
22+
break;
23+
case "RE" :
24+
score[3]++;
25+
}
26+
}
27+
for(int i = 0; i<4; i++) {
28+
System.out.println(scoreName[i]+" x "+score[i]);
29+
}
30+
}
31+
}

0 commit comments

Comments
 (0)