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

Solution (Python):
d = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0,
}

for i in range(int(input())):
    d[input()] += 1

for i, v in d.items():
    print(f'{i} x {v}')

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]
C0 = 0
C1 = 0
C2 = 0
C3 = 0
for i in range(N):
  if S[i] == "AC": C0 += 1
  elif S[i] == "WA": C1 += 1
  elif S[i] == "TLE": C2 += 1
  else: C3 += 1
print("AC x "+ str(C0))
print("WA x "+ str(C1))
print("TLE x "+ str(C2))
print("RE x "+ str(C3))

Solution (Python):

n = int(input())
s = [str(input()) for i in range(n)]

a = s.count(('AC'))
b = s.count(('WA'))
c = s.count(('TLE'))
d = s.count(('RE'))

print("AC x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))

Solution (Python):
n = int(input())
s = list()
for i in range(n):
    s.append(str(input()))
print('AC x '+str(s.count('AC')))
print('WA x '+str(s.count('WA')))
print('TLE x '+str(s.count('TLE')))
print('RE x '+str(s.count('RE')))

Solution (Python):
N = int(input())

d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

for i in range(N):
    a = input()
    d[a] += 1

for x, y in d.items():
    print("{0} x {1}".format(x, y))

Solution (Python):
N = int(input())
a, b, c, d = 0, 0, 0, 0 

for i in range(N):
    i = input()
    if i == "AC":
        a += 1
    elif i == "WA":
        b += 1
    elif i == "TLE":
        c += 1   
    elif i == "RE":
        d += 1

print("AC x " + str(a))
print("WA x " + str(b))
print("TLE x " + str(c))
print("RE x " + str(d))

Solution (Python):
N = int(input())
ans = [0]*4
for i in range(N):
    s = input()
    if s == "AC":
        ans[0] += 1
    elif s == "WA":
        ans[1] += 1
    elif s == "TLE":
        ans[2] += 1
    elif s == "RE":
        ans[3] += 1
print("AC x "+ str(ans[0]),"WA x "+ str(ans[1]),"TLE x "+ str(ans[2]),"RE x "+ str(ans[3]),sep = "\n" )

Solution (Python):
from sys import stdin
n = int(input())
s = [stdin.readline()[:-1] for i in range(n-1)]
s.append(input())
ans = [0,0,0,0]
temp = ["AC","WA","TLE","RE"]
for i in s:
    if i=="AC":
        ans[0] += 1
    elif i=="WA":
        ans[1] += 1
    elif i=="TLE":
        ans[2] += 1
    else:
        ans[3] += 1
for i in range(4):
    print("{result} x {num}".format(result=temp[i],num=ans[i]))

Solution (Python):
from collections import Counter

n = int(input())
results = Counter([input() for _ in range(n)])

for status in ['AC', 'WA', 'TLE', 'RE']:
    print(status + ' x ' + str(results[status]))

Solution (Python):
n = int(input())
dict = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for _ in range(n):
  dict[input()] += 1
for i in dict:
  print(i, 'x', dict[i])

Solution (Python):
n = int(input())
list_s = [input() for x in range(0, n)]
list_count = [0, 0, 0, 0]

for si in list_s:
    if si == 'AC': list_count[0] += 1
    elif si == 'WA': list_count[1] += 1
    elif si == 'TLE': list_count[2] += 1
    else: list_count[3] += 1

print('AC x ' + str(list_count[0]))
print('WA x ' + str(list_count[1]))
print('TLE x ' + str(list_count[2]))
print('RE x ' + str(list_count[3]))

Solution (Python):
n = int(input())
ans_ac = 0
ans_wa = 0
ans_tle = 0
ans_re = 0

for i in range(n):
    s = input()
    if s == 'AC':
        ans_ac += 1
    elif s == 'WA':
        ans_wa += 1
    elif s == 'TLE':
        ans_tle += 1
    else:
        ans_re += 1
        
print('AC x '+str(ans_ac))
print('WA x '+str(ans_wa))
print('TLE x '+str(ans_tle))
print('RE x '+str(ans_re))

Solution (Python):
N = int(input())
S = [input() for i in range(N)]
 
ac = 0
wa = 0
tle = 0
re = 0
for s in S:
  if s == 'AC': ac += 1
  elif s == 'WA': wa += 1
  elif s == 'TLE': tle += 1
  elif s == 'RE': re += 1

print('AC x ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))

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

for i in range(n):
    s = input()
    if s == 'AC':
        ac += 1
    elif s == 'WA':
        wa += 1
    elif s == '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))

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

Solution (Python):
IN = [input() for i in range(1)]
N = int(IN[0])
INP = [input() for i in range(int(N))]
AC = 0
WA = 0
TLE = 0
RE = 0
i = 0

while i < N:
  if INP[i] == "AC":
    AC = AC + 1
    i = i + 1
  elif INP[i] == "WA":
    WA = WA + 1
    i = i + 1
  elif INP[i] == "TLE":
    TLE = TLE + 1
    i = i + 1
  elif INP[i] == "RE":
    RE = RE + 1
    i = i + 1
  else:
    i = i + 1

print("AC x " + str(AC))
print("WA x " + str(WA))
print("TLE x " + str(TLE))
print("RE x " + str(RE))

Solution (Python):
def report(k, r):
    print('{} x {}'.format(k, r[k]))

ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

N = int(input().rstrip())
for i in range(N):
    S = input().rstrip()
    ans[S] += 1

report('AC', ans)
report('WA', ans)
report('TLE', ans)
report('RE', ans)

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

Solution (Python):
n = int(input())
result = [input() for i in range(n)]

print('AC x ' + str(result.count("AC")))
print('WA x ' + str(result.count("WA")))
print('TLE x ' + str(result.count("TLE")))
print('RE x ' + str(result.count("RE")))

Solution (Python):

import sys

sys.setrecursionlimit(500005)
stdin = sys.stdin

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

m = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
n = ni()
for i in range(n):
    m[ns()] += 1

print(f"AC x {m['AC']}")
print(f"WA x {m['WA']}")
print(f"TLE x {m['TLE']}")
print(f"RE x {m['RE']}")

Solution (Python):
def solver(N,S):
    ACs = S.count("AC")
    WAs = S.count("WA")
    TLEs = S.count("TLE")
    REs = S.count("RE")
    print("AC x",ACs)
    print("WA x",WAs)
    print("TLE x",TLEs)
    print("RE x",REs)

N = int(input())
S = []
for i in [0] * N:
    S.append(input())
solver(N,S)

Solution (Python):
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for _ in range(N):
    s = input()
    if s == 'AC':
        ac += 1
    elif s == 'WA':
        wa += 1
    elif s == 'TLE':
        tle += 1
    else:
        re += 1
print(f'AC x {ac}')
print(f'WA x {wa}')
print(f'TLE x {tle}')
print(f'RE x {re}')

Solution (Python):
n = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

for i in range(n):
    st = input()
    d[st] += 1

for k, v in d.items():
    print(k, 'x', v)

Solution (Python):
N = int (input())

S = [input() for i in range(0,N)]

C0=0 
C1=0 
C2=0 
C3=0 

for i in range(0,N):
    if S[i]=='AC':
        C0+=1
    elif S[i]=='WA':
        C1+=1
    elif S[i]=='TLE':
        C2+=1
    elif S[i]=='RE':
        C3+=1

print('AC x', C0)
print('WA x', C1)
print('TLE x', C2)
print('RE x', C3)

Solution (Python):
n = int(input())
s = [input() for i in range(n)]
z = ['AC','WA','TLE','RE']

for j in z:
    print(j+' x '+str(s.count(j)))

Solution (Python):
n = int(input())
s = [input() for i in range(n)]
ac = s.count('AC')
wa = s.count('WA')
tle = s.count('TLE')
re = s.count('RE')
print('AC x ', ac)
print('WA x ', wa)
print('TLE x ', tle)
print('RE x ', re)

Solution (Python):
n=int(input())
d={"AC":0,"WA":0,"TLE":0,"RE":0}
for _ in range(n):
  d[input()]+=1

for d1, d2 in d.items():
  print(d1,'x',d2)

Solution (Python):
n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i 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 ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))

Solution (Python):
n=int(input())
s=["AC","WA","TLE","RE"]
c=[0]*4
for _ in range(n):
  c[s.index(input())]+=1
for s1,c1 in zip(s,c):
  print(f'{s1} x {c1}')

Solution (Python):
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for _ in range(N):
  a = input()
  if a == "AC":
    ac += 1
  if a == "WA":
    wa += 1
  if a == "TLE":
    tle += 1
  if a =="RE":
    re += 1
print(f"AC x {ac}")
print(f"WA x {wa}")
print(f"TLE x {tle}")
print(f"RE x {re}")

Solution (Python):
n = int(input())
A = [input() for _ in range(n)]

print("AC x " + str(A.count("AC")))
print("WA x " + str(A.count("WA")))
print("TLE x " + str(A.count("TLE")))
print("RE x " + str(A.count("RE")))

Solution (Python):
N = int(input())
S = [input() for i in range(N)]

print("AC x " + str(S.count("AC")))
print("WA x " + str(S.count("WA")))
print("TLE x " + str(S.count("TLE")))
print("RE x " + str(S.count("RE")))

Solution (Python):
n = int(input())
j = [0,0,0,0]
for i in range(0,n):
    s = input()
    if s == "AC":
        j[0] += 1
    elif s == "WA":
        j[1] += 1
    elif s == "TLE":
        j[2] += 1
    elif s == "RE":
        j[3] += 1
print('AC x ' +  str(j[0]))
print('WA x ' +  str(j[1]))
print('TLE x ' +  str(j[2]))
print('RE x ' +  str(j[3]))

Solution (Python):
n = int(input())
s = []
for i in range(n):
    si = input()
    s.append(si)

ac = wa = re = tle = 0
for i in range(n):
    if s[i] == 'AC':
        ac += 1
    elif s[i] == 'WA':
        wa += 1
    elif s[i] == 'RE':
        re += 1
    else:
        tle += 1

print(f'AC x {ac}')
print(f'WA x {wa}')
print(f'TLE x {tle}')
print(f'RE x {re}')

Solution (Python):
N = int(input())
S = list()
for i in range(N):
    S.append(input())

c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i in S:
  if i == "AC":
    c0 += 1
    
  if i == "WA":
    c1 += 1

  if i == "TLE":
    c2 += 1
    
  if i == "RE":
    c3 += 1
  
  
print("AC x " + str(c0))
print("WA x " + str(c1))
print("TLE x " + str(c2))
print("RE x " + str(c3))

Solution (Python):
status = ['AC','WA','TLE','RE']
li = []

N = int(input())
for n in range(N):
  li.append(input())

for s in status:
  print(s,'x',li.count(s))

Solution (Python):
N = int(input())
S = list()
for i in range(N):
    S.append(input())

judge = ['AC', 'WA', 'TLE', 'RE']
count = [0] * 4

for i in range(N):
    letter = S[i]
    ind = judge.index(letter)
    count[ind] += 1

for i in range(len(judge)):
    print(judge[i], "x", str(count[i]))

Solution (Python):
n = int(input())

num_AC = 0
num_WA = 0
num_TLE = 0
num_RE = 0

for i in range(n):
    i = input()
    if i == "AC":
        num_AC += 1
    elif i == "WA":
        num_WA += 1
    elif i == "TLE":
        num_TLE += 1
    elif i == "RE":
        num_RE += 1
    

print("AC x " + str(num_AC))
print("WA x " + str(num_WA))
print("TLE x " + str(num_TLE))
print("RE x " + str(num_RE))

Solution (Python):
n = int(input())

cnt_ac = 0
cnt_wa = 0
cnt_tle = 0
cnt_re = 0

for i in range(n):
    s = input()
    if s == 'AC':
        cnt_ac += 1
    elif s == 'WA':
        cnt_wa += 1
    elif s == 'TLE':
        cnt_tle += 1
    elif s == "RE":
        cnt_re += 1

print('AC x ', cnt_ac)
print('WA x ', cnt_wa)
print('TLE x ', cnt_tle)
print('RE x ', cnt_re)

Solution (Python):
Judge = [0,0,0,0]
n = int(input())
S = [input() for i in range(n)]

print('AC x',S.count('AC'))
print('WA x',S.count('WA'))
print('TLE x',S.count('TLE'))
print('RE x',S.count('RE'))

Solution (Python):
n=int(input())


ac=0
wa=0
tle=0
re=0
for i in range(n) :
    s=str(input())
    if s=="AC" :
        ac=ac+1
    elif s=="WA" :
        wa=wa+1
    elif s=="TLE" :
        tle=tle+1
    else :
        re=re+1


print("AC x",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)

Solution (Python):
n = int(input())
ac,wa,tle,re = 0,0,0,0
for i in range(n):
  s = str(input())
  if s == "AC":
    ac += 1
  elif s == "WA":
    wa += 1
  elif s == "TLE":
    tle += 1
  else:
    re += 1
print("AC x",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)

Solution (Python):
def solve():
    N = int(input())
    cnt = {}
    for i in range(N):
        result = input()
        cnt[result] = cnt.get(result, 0) + 1
    for result in ("AC", "WA", "TLE", "RE"):
        print("{} x {}".format(result, cnt.get(result, 0)))

if __name__ == "__main__":
    solve()

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]
AC = 0
WA = 0
TLE = 0
RE = 0
for i in S:
    if i == 'AC':
        AC += 1
    elif i == 'WA':
        WA += 1
    elif i == '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))

Solution (Python):
import numpy as np
n=int(input())
a=np.array([0]*4)
for i in range(n):
    s= str(input())
    if s=='AC':
        a[0]+=1
    elif s=='WA':
        a[1]+=1
    elif s=='TLE':
        a[2]+=1
    elif s=='RE':
        a[3]+=1
print('AC x '+str(a[0]))
print('WA x '+str(a[1]))
print('TLE x '+str(a[2]))
print('RE x '+str(a[3]))

Solution (Python):
N=int(input())
S=[input() for _ in range(N)]

a=0
w=0
t=0
r=0

for i in range(N):
  if S[i] =="AC":
    a+=1
  elif S[i] =="WA":
    w+=1
  elif S[i] =="TLE":
    t+=1
  elif S[i] =="RE":
    r+=1

print("AC x "+ str(a))
print("WA x "+ str(w))
print("TLE x "+ str(t))
print("RE x "+ str(r))

Solution (Python):
N = int(input())
s = [input() for i in range(N)]
for v in ['AC', 'WA', 'TLE', 'RE']:
  print('{0} x {1}'.format(v, s.count(v)))

Solution (Python):
N = int(input())
L = []
for i in range(N):
  L.append(input())

print("AC x "+str(L.count('AC'))+
"\nWA x "+str(L.count('WA'))+
"\nTLE x "+str(L.count('TLE'))+
"\nRE x "+str(L.count('RE')))

Solution (Python):
N = int(input())


B = ['AC', 'WA', 'TLE', 'RE']
A = []
for i in range(N):
  A.append(input())
for i in range(4):
  print(B[i],'x' ,A.count(B[i]))

Solution (Python):

import sys
from itertools import chain
from collections import Counter





def solve(N: int, S: "List[str]"):
    d = Counter(S)
    for key in ("AC", "WA", "TLE", "RE"):
        print(f"{key} x {d.get(key, 0)}")


def main():
    tokens = chain(*(line.split() for line in sys.stdin))
    
    N = int(next(tokens))  
    S = [next(tokens) for _ in range(N)]  
    solve(N, S)


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
array = [input() for i in range(N)]
count_AC = 0
count_TLE = 0
count_RE = 0
count_WA = 0
for i in array:
    if i == "AC":
        count_AC += 1
    elif i == "TLE":
        count_TLE += 1
    elif i == "RE":
        count_RE += 1
    elif i == "WA":
        count_WA += 1
print("AC x "+str(count_AC))
print("WA x "+str(count_WA))
print("TLE x "+str(count_TLE))
print("RE x "+str(count_RE))

Solution (Python):
N = int(input())

AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    s = input()
    if s == 'AC':
        AC += 1
    if s == 'WA':
        WA += 1
    if s == 'TLE':
        TLE += 1
    if s == 'RE':
        RE += 1

print('AC x ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))

Solution (Python):

N=int(input())
C=[input() for i in range(N)]
AC=C.count('AC')
WA=C.count('WA')
TLE=C.count('TLE')
RE=C.count('RE')
print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(AC, WA, TLE, RE))

Solution (Python):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    S = input()
    if S == "AC":
        AC += 1
    elif S == "WA":
        WA += 1
    elif S == "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))

Solution (Python):
n = int(input())

dic = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}

for i in range(n):
    a = input()
    dic[a] += 1

print("AC x " + str(dic["AC"]))
print("WA x " + str(dic["WA"]))
print("TLE x " + str(dic["TLE"]))
print("RE x " + str(dic["RE"]))

Solution (Python):
n = int(input())
s = [str(input()) for i in range(n)]
for h in ['AC','WA','TLE','RE']:
    print(h,'x',s.count(h))

Solution (Python):
n = int(input())
s = [input() for _ in range(n)]
dic = {"AC": 0, "WA": 0, "TLE": 0, "RE":0}

for v in s:
  dic[v] += 1

print("AC x {}".format(dic["AC"]))
print("WA x {}".format(dic["WA"]))
print("TLE x {}".format(dic["TLE"]))
print("RE x {}".format(dic["RE"]))

Solution (Python):
N=int(input())
d=[input() for i in range(N)]
ac=0
wa=0
tle=0
re=0
for i in range(N):
    if d[i]=="AC":
        ac+=1
    elif d[i]=="WA":
        wa+=1
    elif d[i]=="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))

Solution (Python):
N = int(input())
C_0 = 0
C_1 = 0
C_2 = 0
C_3 = 0
for _ in range(N):
    S = input()
    if S == 'AC':
        C_0 += 1
    elif S == 'WA':
        C_1 += 1
    elif S == 'TLE':
        C_2 += 1
    else:
        C_3 += 1
print('AC x {}'.format(C_0))
print('WA x {}'.format(C_1))
print('TLE x {}'.format(C_2))
print('RE x {}'.format(C_3))

Solution (Python):
N = int(input())

C0 = 0
C1 = 0
C2 = 0
C3 = 0

for i in range(0,N):
  S = str(input())
  if S == 'AC':
    C0 += 1
  elif S == 'WA':
    C1 += 1
  elif S == 'TLE':
    C2 += 1
  elif S == 'RE':
    C3 += 1
    
print('AC x',C0)
print('WA x',C1)
print('TLE x',C2)
print('RE x',C3)

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

Solution (Python):



def next_line():
    return input()


def next_int():
    return int(input())


def next_int_array_one_line():
    return list(map(int, input().split()))


def next_int_array_multi_lines(size):
    return [int(input()) for _ in range(size)]


def next_str_array(size):
    return [input() for _ in range(size)]


def main():
    n = next_int()
    str = ["AC", "WA", "TLE", "RE"]
    awtr = [0] * 4
    for _ in range(n):
        s = next_line()
        if s == "AC":
            awtr[0] += 1
        elif s == "WA":
            awtr[1] += 1
        elif s == "TLE":
            awtr[2] += 1
        else:
            awtr[3] += 1
    for i in range(4):
        print(str[i] + " x ", end="")
        print(awtr[i])


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
ans_ac = 0
ans_wa = 0
ans_tle = 0
ans_re = 0

for i in range(n):
    s = input()
    if s == 'AC':
        ans_ac += 1
    elif s == 'WA':
        ans_wa += 1
    elif s == 'TLE':
        ans_tle += 1
    else:
        ans_re += 1
        
print('AC x '+str(ans_ac))
print('WA x '+str(ans_wa))
print('TLE x '+str(ans_tle))
print('RE x '+str(ans_re))

Solution (Python):
n = int(input())
ans_count = [0] * 4
ans = ['AC','WA','TLE','RE']

for s in range(n):
    tmp = input()
    for t in range(4):
        if tmp == ans[t]:
            ans_count[t] += 1

for s in range(4):
    print('%s x %d' % (ans[s],ans_count[s]))

Solution (Python):
from collections import Counter

N = int(input())
res = Counter([input() for _ in range(N)])

print('AC x ' + str(res['AC']))
print('WA x ' + str(res['WA']))
print('TLE x ' + str(res['TLE']))
print('RE x ' + str(res['RE']))

Solution (Python):
N = int(input())
res = [input() for _ in range(N)]

print('AC x ' + str(res.count('AC')))
print('WA x ' + str(res.count('WA')))
print('TLE x ' + str(res.count('TLE')))
print('RE x ' + str(res.count('RE')))

Solution (Python):
N=int(input())
s=[0]*4
for i in range(N):
  A=str(input())
  if A=='AC':
    s[0]+=1
  elif A=='WA':
    s[1]+=1
  elif A=='TLE':
    s[2]+=1
  elif A=='RE':
    s[3]+=1
print('AC','x',s[0])
print('WA','x',s[1])
print('TLE','x',s[2])
print('RE','x',s[3])

Solution (Python):
import sys
import bisect as bi
import math
from collections import defaultdict as dd
import heapq
input=sys.stdin.readline


mo=10**9+7
def cin():
    return map(int,sin().split())
def ain():            
    return list(map(int,sin().split()))
def sin():
    return input()
def inin():
    return int(input())









n=inin()
d=dd(int)
for i in range(n):
    s=sin().strip()
    d[s]+=1
print("AC x",d["AC"])
print("WA x",d["WA"])
print("TLE x",d["TLE"])
print("RE x",d["RE"])

Solution (Python):
n = int(input())
v = [input() for i in range(n)]

for i in ["AC", "WA", "TLE", "RE"]:
  print("{} x {}".format(i, v.count(i)))

Solution (Python):
N = int(input())
s = [input() for i in range(N)]
'''
for v in ["AC", "WA", "TLE", "RE"]:
    print("{0} x {1}".format(v, s.count(v)))
'''

print("AC x",s.count("AC"))
print("WA x",s.count("WA"))
print("TLE x",s.count("TLE"))
print("RE x",s.count("RE"))

Solution (Python):
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
  x = input()
  if (x == "AC"):
    ac = ac + 1
  elif (x == "WA"):
    wa = wa + 1
  elif (x == "TLE"):
    tle = tle + 1
  else:
    re = re + 1
print("AC", "x", ac)
print("WA", "x", wa)
print("TLE", "x", tle)
print("RE", "x", re)

Solution (Python):
N = int(input())

ACcount = 0 
WAcount = 0
TLEcount = 0
REcount = 0
for i in range(N):
	S=input()

	if S == "AC":
		ACcount = ACcount + 1
	elif S == "WA":
		WAcount = WAcount + 1
	elif S == "TLE":
		TLEcount = TLEcount + 1
	elif S == "RE":
		REcount = REcount + 1

print("AC x", ACcount)
print("WA x", WAcount)
print("TLE x", TLEcount)
print("RE x", REcount)

Solution (Python):
from collections import defaultdict

n = int(input())
results = defaultdict(lambda: 0)

for _ in range(n):
  s = input()
  results[s] += 1

for judge in ['AC', 'WA', 'TLE', 'RE']:
  print(judge, ' x ', results[judge])

Solution (Python):
n=int(input())
count1=0
count2=0
count3=0
count4=0
 
for i in range(n):
  s=input()
  if(s=="AC"):
    count1+=1
  elif(s=="WA"):
    count2+=1
  elif(s=="TLE"):
    count3+=1
  elif(s=="RE"):
    count4+=1
print("AC x",count1)
print("WA x",count2)
print("TLE x",count3)
print("RE x",count4)

Solution (Python):
import sys
import numpy as np  

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


N = int(readline())

AC, WA, TLE, RE = 0, 0, 0, 0

for i in range(N):
    s = readline().rstrip().decode()
    if s == "AC":
        AC += 1
    elif s == "WA":
        WA += 1
    elif s == "TLE":
        TLE += 1
    elif s == "RE":
        RE += 1

print(f"AC x {AC}")
print(f"WA x {WA}")
print(f"TLE x {TLE}")
print(f"RE x {RE}")

Solution (Python):
n = int(input()) 
a = [input() for _ in range(n)] 
b = [0,0,0,0] 
c = ["AC","WA","TLE","RE"]

for i in range(len(c)): 
    for k in range(n): 
        if a[k] == c[i]:
           b[i] += 1

for i in range(len(c)): 
    print(c[i]+" x "+str(b[i]))

Solution (Python):
Num = int(input())
AC =0
WA =0
TLE=0
RE =0

for i in range(Num):
  s = input()
  if(s=='AC'):
    AC+=1
  if(s=='WA'):
    WA+=1
  if(s=='TLE'):
    TLE+=1
  if(s=='RE'):
    RE+=1
    
print('AC x '+str(AC))
print('WA x '+str(WA))
print('TLE x '+str(TLE))
print('RE x '+str(RE))

Solution (Python):
n=int(input())
s=[input() for i in range(n)]
for a in ["AC", "WA", "TLE", "RE"]:
    print(f"{a} x {s.count(a)}")

Solution (Python):
N = int(input())
judge = []
for i in range(N):
    judge.append(input())

counter = [0, 0, 0, 0]
for i in range(N):
    if judge[i] == "AC":
        counter[0] += 1
    if judge[i] == "WA":
        counter[1] += 1
    if judge[i] == "TLE":
        counter[2] += 1
    if judge[i] == "RE":
        counter[3] += 1

print("AC x " + str(counter[0]))
print("WA x " + str(counter[1]))
print("TLE x " + str(counter[2]))
print("RE x " + str(counter[3]))

Solution (Python):
n = int(input())
res = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(n):
    seq = input()
    res[seq] += 1

for key in  res.keys():
    print(f"{key} x {res[key]}")

Solution (Python):
ac,wa,tle,re = 0,0,0,0
N = int(input())
for x in range(N):
  s = input()
  if s == "AC":
    ac += 1
  elif s == "WA":
    wa += 1
  elif s == "TLE":
    tle += 1
  elif s == "RE":
    re += 1
print("AC x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))

Solution (Python):
a, b, c, d =0, 0, 0 , 0
for i in range(int(input())):
    x = input()
    if x == 'AC':
        a += 1
    if x == 'TLE':
        b += 1
    if x == 'RE':
        c += 1
    if x == 'WA':
        d += 1
print('AC x', a)
print('WA x', d)
print('TLE x', b)
print('RE x', c)

Solution (Python):
n = int(input())
s = [input() for i in range(n)]
ans = ["AC", "WA", "TLE", "RE"]
for i in range(4):
    char = ans[i]
    print(ans[i] + " x " + str(s.count(char)))

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]

AC = 0
WA = 0
TLE = 0
RE = 0

for i in S:
    if i == 'AC':
        AC += 1
    elif i == 'WA':
        WA += 1
    elif i == 'TLE':
        TLE += 1
    else:
        RE += 1
        
print('AC x', AC)
print('WA x', WA)
print('TLE x', TLE)
print('RE x', RE)

Solution (Python):
length = int(input())
cnt = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}

for _ in range(length):
    s = input()
    cnt[s] += 1
    
for s, num in cnt.items():
    print("{} x {}".format(s, num))

Solution (Python):
hashmap = {"AC":0, "WA":0, "TLE":0, "RE":0}
a = int(input())
for i in range(a):
    hashmap[str(input())] += 1
print("AC x " + str(hashmap["AC"]))
print("WA x " + str(hashmap["WA"]))
print("TLE x " + str(hashmap["TLE"]))
print("RE x " + str(hashmap["RE"]))

Solution (Python):
n = int(input())
count_ac, count_wa, count_tle, count_re = 0, 0, 0, 0
for i in range(n):
    s = input()
    if s == "AC":
        count_ac += 1
    if s == "WA":
        count_wa += 1
    if s == "TLE":
        count_tle += 1
    if s == "RE":
        count_re += 1

print("AC x", count_ac)
print("WA x", count_wa)
print("TLE x", count_tle)
print("RE x", count_re)

Solution (Python):
n = int(input())
l = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
  l[input()] += 1
print('AC x',l['AC'])
print('WA x',l['WA'])
print('TLE x',l['TLE'])
print('RE x',l['RE'])

Solution (Python):
Nin = int(input())
a = [input() for i in range(Nin)]

ac  = 0
wa  = 0
tle = 0
re  = 0

for i in range(Nin):
    if a[i] == "AC":
        ac += 1
    elif a[i] == "WA":
        wa += 1
    elif a[i] == "TLE":
        tle += 1
    elif a[i] == "RE":
        re += 1

print("AC x", ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)

Solution (Python):
N = int(input())
cnt = [0]*4
judge = ["AC","WA","TLE","RE"]
for i in range(N):
    s = input()
    if s=="AC":
        cnt[0]+=1
    elif s=="WA":
        cnt[1]+=1
    elif s=="TLE":
        cnt[2]+=1
    else:
        cnt[3]+=1
for i in range(4):
    print(judge[i],"x",cnt[i])

Solution (Python):
n = int(input())
a = [input() for i in range(n)]

c0, c1, c2, c3 = 0, 0, 0, 0

for output in a:
    if output == 'AC':
        c0 += 1
    elif output == 'WA':
        c1 += 1
    elif output == 'TLE':
        c2 += 1
    elif output == 'RE':
        c3 += 1
        
        
print('AC x {}'.format(c0))
print('WA x {}'.format(c1))
print('TLE x {}'.format(c2))
print('RE x {}'.format(c3))

Solution (Python):
n = int(input())
s_lst = list(str(input()) for _ in range(n))
count_lst = [0, 0, 0, 0]

for i in range(n):
    consequence = s_lst[i]
    if consequence == 'AC':
        count_lst[0] += 1
    elif consequence == 'WA':
        count_lst[1] += 1
    elif consequence == 'TLE':
        count_lst[2] += 1
    else:
        count_lst[3] += 1

consequence_lst = ['AC x {}'.format(count_lst[0]), 'WA x {}'.format(count_lst[1]), 'TLE x {}'.format(count_lst[2]), 'RE x {}'.format(count_lst[3])]

for i in range(4):
    con = consequence_lst[i]
    print(con)

Solution (Python):
N = int(input())
res = [0]*4
for i in range(N):
    s = input()
    if s == "AC":
        res[0] += 1
    elif s == "WA":
        res[1] += 1
    elif s == "TLE":
        res[2] += 1
    elif s == "RE":
        res[3] += 1

print(f"AC x {res[0]}")
print(f"WA x {res[1]}")
print(f"TLE x {res[2]}")
print(f"RE x {res[3]}")

Solution (Python):
n = int(input())
s = [input()for i in range(n)]
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(n):
    if s[i] == 'AC':
        c0 += 1
    elif s[i] == 'WA':
        c1 += 1
    elif s[i] == 'TLE':
        c2 += 1
    else:
        c3 += 1
print(f'AC x {c0}\nWA x {c1}\nTLE x {c2}\nRE x {c3}')

Solution (Python):
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
  k = input().upper()
  if k == 'AC':
    ac +=1
  elif k == 'WA':
    wa +=1
  elif k == 'TLE':
    tle +=1
  elif k == 'RE':
    re +=1
    
print('{} x {}'.format('AC',ac))
print('{} x {}'.format('WA',wa))
print('{} x {}'.format('TLE',tle))
print('{} x {}'.format('RE',re))

Solution (Python):
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
  k = input().upper()
  if k == 'AC':
    ac +=1
  elif k == 'WA':
    wa +=1
  elif k == 'TLE':
    tle +=1
  elif k == 'RE':
    re +=1
    
print('{} x {}'.format('AC',ac))
print('{} x {}'.format('WA',wa))
print('{} x {}'.format('TLE',tle))
print('{} x {}'.format('RE',re))

Solution (Python):
n = int(input())
S = {"AC":0,"WA":0,"TLE":0,"RE":0}

for i in range(n):
  S[input()] += 1

print("AC x "+str(S["AC"]))
print("WA x "+str(S["WA"]))
print("TLE x "+str(S["TLE"]))
print("RE x "+str(S["RE"]))

Solution (Python):
N = int(input())

C0 = C1 = C2 = C3 = 0

for i in range(N):
    S = input()
    if S == "AC":
        C0 += 1
    elif S == "WA":
        C1 += 1
    elif S == "TLE":
        C2 += 1
    elif S == "RE":
        C3 += 1

print("AC x "+str(C0))
print("WA x "+str(C1))
print("TLE x "+str(C2))
print("RE x "+str(C3))

Solution (Python):
N=int(input())
C=[0]*4
S=['AC','WA','TLE','RE']
for _ in range(N):
  s=input()
  if s==S[0]:
    C[0]+=1
  elif s==S[1]:
    C[1]+=1
  elif s==S[2]:
    C[2]+=1
  else:
    C[3]+=1
for i in range(4):
  print(S[i],'x',C[i])

Solution (Python):
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
S = Counter(S)
for s in ["AC", "WA", "TLE", "RE"]:
    print(f"{s} x {S[s]}")

Solution (Python):
n=int(input())
ac=0
wa=0
tle=0
re=0
for _ in range(n):
    s=input()
    if s=="AC":
        ac+=1
    elif s=="WA":
        wa+=1
    elif s=="TLE":
        tle+=1
    else:
        re+=1
print("AC x ",ac)
print("WA x ",wa)
print("TLE x ",tle)
print("RE x ",re)

Solution (Python):
ans = {
    'AC' : 0,
    'WA' : 0,
    'TLE' : 0,
    'RE' : 0
}

for i in range(int(input())):
    ans[input()] += 1

for k, v in ans.items():
    print(k, 'x', v)

Solution (Python):
N = int(input())
S = [input() for i in range(N)]
c0, c1, c2, c3 = 0, 0, 0, 0
for i in S:
    if i == 'AC':
        c0 += 1 
    if i == 'WA':
        c1 += 1
    if i == 'TLE':
        c2 += 1
    if i == 'RE':
        c3 += 1
print('AC','x',c0)
print('WA','x',c1)
print('TLE','x',c2)
print('RE','x',c3)

Solution (Python):
N = int(input())
S = (input() for i in range(N))
c0, c1, c2, c3 = 0, 0, 0, 0
for i in S:
    if i == 'AC':
        c0 += 1 
    if i == 'WA':
        c1 += 1
    if i == 'TLE':
        c2 += 1
    if i == 'RE':
        c3 += 1
print('AC','x',c0)
print('WA','x',c1)
print('TLE','x',c2)
print('RE','x',c3)