Problem:


Score : 200 points

Problem Statement

Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.

The problem has N test cases.

For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively.

See the Output section for the output format.

Constraints

1 \leq N \leq 10^5

S_i is AC, WA, TLE, or RE.

Input

Input is given from Standard Input in the following format:

N
S_1
\vdots
S_N

Output

Let C_0, C_1, C_2, and C_3 be the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively. Print the following:

AC x C_0
WA x C_1
TLE x C_2
RE x C_3

Sample Input 1

6
AC
TLE
AC
AC
WA
TLE

Sample Output 1

AC x 3
WA x 1
TLE x 2
RE x 0

We have 3, 1, 2, and 0 test case(s) for which the verdict is AC, WA, TLE, and RE, respectively.

Sample Input 2

10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Sample Output 2

AC x 10
WA x 0
TLE x 0
RE x 0



Sample input:
6
AC
TLE
AC
AC
WA
TLE


Sample output:
AC x 3
WA x 1
TLE x 2
RE x 0

Submission status: Runtime Error

Solution code:
from collections import Counter
n = int(input())
s = [input() for i in range(n)]

c = Counter(s)

for k in ['AC', 'WA', 'TLE', 'RE']:
    if k in c:
        print('{k} x {}'.format(k, c[k]))
    else:
        print('{} x {}'.format(k, c[k]))

Submission status: Runtime Error

Solution code:
N = int(input())

ans = [0]*4
for n in range(n):
  C = input()
  if C = "AC":
    ans[0] += 1
  elif C = "WA":
    ans[1] += 1
  elif C = "TLE":
    ans[2] += 1
  elif C = "RE":
    ans[3] += 1

print("AC x ".format(ans[0]))
print("WA x ".format(ans[1]))
print("TLE x ".format(ans[2]))
print("RE x ".format(ans[3]))

Submission status: Runtime Error

Solution code:
from collections import Counter
lst=[]
for i in range(int(input())):
  lst.append(input())
dic=dict(Counter(lst))
for i in ['AC','WA','TLE','RE']:
  print(f'{i} × {dic[i]}')

Submission status: Runtime Error

Solution code:
n = int(input())
s = []
for i in range(n):
  s.append(int(input()))
print("AC x ",s.count("AC"))
print("WA x ",s.count("WA"))
print("TLE x ",s.count("TLE"))
print("RE x ",s.count("RE"))

Submission status: Runtime Error

Solution code:
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0

for _ in range(n):
  x = input()
  if x == 'AC':
    ac += 1
  elif x == 'WA':
    wa += 1
  elif x == 'TLE':
    tle += 1
  else:
    re += 1
    
print('AC x ', ac)
print('WA x ', waz)
print('TLE x ', tle)
print('RE x ', re)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>
#include <math.h>
#include <vector>
#include <algorithm>
#include <iomanip>
#include <set>
#include <queue>
#include <deque>
#include <map>
#include <stack>
#include <cmath>
using namespace std;

#define mod 1000000007
#define ten5 100005
#define ten52 200005
#define ten6 1000005
#define PI 3.1415926
#define pb(x) push_back(x)
#define all(x) x.begin(),x.end()
#define mkpr(x1,x2) make_pair(x1,x2)
typedef long long int ll;


//stack<char> stk;
//set<ll> sll;
map<string,ll> mp;
//map<pair<ll,ll>,ll>::iterator iter;
//map<ll,ll> mp;
//deque<ll> deq;
//vector<ll> vll;
//ll num[ten52];

int main(void)
{
    long long int m,n,i,j;
    cin>>m;
    string s;
    for(i=0;i<m;i++)
    {
        cin>>s;
        mp[s]++;
    }
    cout<<"AC * "<<mp["AC"]<<endl;
    cout<<"WA * "<<mp["WA"]<<endl;
    cout<<"TLE * "<<mp["TLE"]<<endl;
    cout<<"RE * "<<mp["RE"]<<endl;
    return 0;
}

Submission status: Runtime Error

Solution code:
N = int(input())
ans = [0,0,0,0]
for _ in range(N):
    a = input()
    if a == 'AC':
        ans[0] += 1
    elif a == 'WA':
        ans[1] += 1
    elif a == 'TLE':
        ans[2] += 1
    elif a == 'RE':
        a[3] += 1
print('AC ×',ans[0])
print('WA ×',ans[1])
print('TLE ×',ans[2])
print('RE ×',ans[3])

Submission status: Runtime Error

Solution code:
n = int(input())
a, b, c, d = 0, 0, 0, 0
for i in range(n):
  s = input()
  if s == 'AC':
    a+=1
  elif s== 'WA':
    b+=1
  elif s=='TLE':
    c+=1
  else:
    d+=1
print("AC x "a)
print("WA x "b)
print("TLE x "c)
print("RE x "d)

Submission status: Runtime Error

Solution code:
AC = 0
WA = 0
TLE = 0
RE = 0

N = int(input())
for i in N:
  l = input()
  if l == "AC":
    AC += 1
  elif l == "WA":
    WA += 1
  elif l == "TLE":
    TLE += 1
  else:
    RE += 1
print("AC x " + str(AC)) 
print("WA x " + str(WA))
print("TLE x " + str(TLE)) 
print("RE x " + str(RE))

Submission status: Runtime Error

Solution code:
import collections
n = raw_input()
cc = collections.Counter([raw_input() for _ in range(n)])

for u in ['AC', 'WA', 'TLE', 'RE']:
	print '{}x{}'.format(u, cc[u])

Submission status: Runtime Error

Solution code:
import sys

sys.setrecursionlimit(500005)
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
dic = defaultdict(int)
for i in range(n):
    dic[ns()] += 1
for w in ("AC", "WA", "TLE", "RE"):
    print(f"{w} x {dic[w]}")

Submission status: Runtime Error

Solution code:
ar = [0, 0, 0, 0]
for _ in range(int(input())):
  s = input()
  ar[{"AC": 0, "WA": 1, "TLE": 2, "RE": 3}[s]] += 1
print("AC x", arr[0])
print("WA x", arr[1])
print("TLE x", arr[2])
print("RE x", arr[3])

Submission status: Runtime Error

Solution code:
n = int(input())

ac_counter = 0
wa_counter = 0
tle_counter = 0
re_counter = 0

for i in range(n):
  str = input()
  if str == "AC":
    ac_counter += 1
  elif str == "WA":
    wa_counter += 1
  elif str == "TLE":
    tle_counter += 1
  else :
    re_counter += 1
print("AC x "+str(ac_counter))
print("WA x "+str(wa_counter))
print("TLE x "+str(tle_counter))
print("RE x "+str(re_counter))