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):


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        for line in sys.stdin:
            lines.append(line.strip())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    n = int(lines[0])
    ss = lines[1:]

    return (n, ss)


def solve(n, ss):


    d = dict()
    for i in range(n):
        s = ss[i]
        cnt = d.get(s, 0)
        cnt = cnt + 1
        d[s] = cnt

    result = []
    for e in ['AC', 'WA', 'TLE', 'RE']:
        result.append("%s x %d " % (e, d.get(e, 0)))
    
    return result    


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Solution (Python):
import collections

def main():
    n = int(input())
    s = []
    for i in range(n):
        s_ = input()
        s.append(s_)
    
    c = collections.Counter(s)
    print("AC x " + str(c["AC"]))
    print("WA x " + str(c["WA"]))
    print("TLE x " + str(c["TLE"]))
    print("RE x " + str(c["RE"]))

if __name__ == "__main__":
    main()

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

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

idx = 0

while idx < N:
    idx += 1
    AAA = input()
    if AAA == "AC":
        ac += 1
    elif AAA == "WA":
        wa += 1
    elif AAA == "TLE":
        tle += 1
    elif AAA == "RE":
        re += 1

print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(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
    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())
cnt = [0] * 4
for n in range(N):
    s = input()
    if s == 'AC':
        cnt[0] += 1
    elif s == 'WA':
        cnt[1] += 1
    elif s == 'TLE':
        cnt[2] += 1
    elif s == 'RE':
        cnt[3] += 1

print('AC x ',cnt[0])
print('WA x ',cnt[1])
print('TLE x ',cnt[2])
print('RE x ',cnt[3])

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

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

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

Solution (Python):
N = int(input())
l =[]
a=0
b=0
c=0
d=0
for i in range(N):
  l.append(input())
for i in range(N):
  if l[i]=="AC":
    a = a+1
  elif l[i]=="WA":
    b = b+1
  elif l[i]=="TLE":
    c = c+1
  else:
    d = d+1
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)

Solution (Python):
judge = ['AC', 'WA', 'TLE', 'RE']
cnt = [0] * 4
N = int(input())
for _ in range(N):
    s = input()
    for i in range(len(judge)):
        if s == judge[i]:
            cnt[i] += 1
for i in range(4):
    print(judge[i] + ' ' + 'x' + ' ' + str(cnt[i]))

Solution (Python):
N = int(input())
ans = []
for i in range(4):
    ans.append(0)
for n 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]))
print('WA x '+ str(ans[1]))
print('TLE x '+ str(ans[2]))
print('RE x '+ str(ans[3]))

Solution (Python):
n = int(input())
s = []
judges = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
    s = input().strip()
    judges[s] += 1

for judge,count in judges.items():
    print(f"{judge} x {count}")

Solution (Python):
import sys

readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda: readline().rstrip() 
ni = lambda: int(readline().rstrip()) 
nm = lambda: map(int, readline().split()) 
nl = lambda: list(map(int, readline().split())) 

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

print("AC x", cnt["AC"])
print("WA x", cnt["WA"])
print("TLE x", cnt["TLE"])
print("RE x", cnt["RE"])

Solution (Python):
n = int(input())
l = [0, 0, 0, 0]
for _ in range(n) :
    s = input()
    if s == "AC" :
        l[0] += 1
    if s == "WA" :
        l[1] += 1
    if s == "TLE" :
        l[2] += 1
    if s == "RE" :
        l[3] += 1
print("AC x " + str(l[0]) + "\nWA x " + str(l[1]) + "\nTLE x " + str(l[2]) + "\nRE x " + str(l[3]))

Solution (Python):
n = int(input())
count_dict = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(n):
    s = input()
    if s in count_dict:
        count_dict[s] += 1
for k, v in count_dict.items():
    print("{} x {}".format(k, v))

Solution (Python):
N = int(input())
S = [input() for i 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 {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

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

AC_cnt = 0
WA_cnt = 0
TLE_cnt = 0
RE_cnt = 0


L = []

for n in range(0,N):
    n = input()
    L.append(n)
    if n == "AC":
        AC_cnt += 1
    elif n == "WA":
        WA_cnt += 1
    elif n == "TLE":
        TLE_cnt += 1
    elif n == "RE":
        RE_cnt += 1

print("AC x",AC_cnt)
print("WA x",WA_cnt)
print("TLE x",TLE_cnt)
print("RE x",RE_cnt)

Solution (Python):
import collections


def actual(N, S):
    c = collections.Counter(S)

    s = ''
    s += f'AC x {c["AC"]}\n'
    s += f'WA x {c["WA"]}\n'
    s += f'TLE x {c["TLE"]}\n'
    s += f'RE x {c["RE"]}'

    return s

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

print(actual(N, S))

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

for x 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())

results = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(n):
    result = input()
    results[result] += 1

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

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

Solution (Python):
n,*a = map(str,open(0).read().split())

n = int(n)
A = a.count("AC")
B = a.count("WA")
C = a.count("TLE")
D = a.count("RE")

print("AC " + "x " + str(A))
print("WA " + "x " + str(B))
print("TLE " + "x " + str(C))
print("RE " + "x " + str(D))

Solution (Python):
import collections
n=int(input())
l=[]
for i in range(n):
  l.append(input())
c=collections.Counter(l)
for k in ['AC','WA','TLE','RE']:
  if k in c.keys():
    print(k+' x '+str(c[k]))
  else: print(k+' x '+str(0))

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

AC = s.count("AC")
TLE = s.count("TLE")
WA = s.count("WA")
RE = s.count("RE")


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

Solution (Python):
n = int(input())
judge = [0,0,0,0]
for _ in range(n):
    a = input()
    if a == 'AC':
        judge[0] += 1
    elif a == 'WA':
        judge[1] += 1
    elif a == 'TLE':
        judge[2] += 1
    else:
        judge[3] += 1
print('AC x '+str(judge[0])+'\nWA x '+str(judge[1])+'\nTLE x '+str(judge[2])+'\nRE x '+str(judge[3]))

Solution (Python):
n = int(input())
s = [input() for x in range(n)]

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

for si in s:
    if si in answers.keys():
        answers[si] += 1

for ans,c in answers.items():
    print(ans + ' x ' + str(c))

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

Solution (Python):
def main():
    N = int(input())
    AC = 0
    WA = 0
    TLE = 0
    RE = 0
    for i in range(N):
        A = str(input())
        if A == 'AC':
            AC += 1
        elif A == 'WA':
            WA += 1
        elif A == 'TLE':
            TLE += 1
        elif A == 'RE':
            RE += 1
    print('AC x ' + str(AC))
    print('WA x ' + str(WA))
    print('TLE x ' + str(TLE))
    print('RE x ' + str(RE))
if __name__ == '__main__':
    main()

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

c_dict = {}
for _ in range(N):
    s = input()
    if s in c_dict.keys():
        c_dict[s]+=1
    else:
        c_dict[s]=1

keys = ["AC", "WA", "TLE", "RE"]
for key in keys:
    if not key in c_dict.keys():
        print("%s x 0"%(key))
    else:
        print("%s x %d"%(key, c_dict[key]))

Solution (Python):
ans = [0]*4
for i in range(int(input())):
    S = input()
    if S == "AC":
        ans[0] += 1
    elif S == "WA":
        ans[1] += 1
    elif S == "TLE":
        ans[2] += 1
    else:
        ans[3] += 1
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(*ans))

Solution (Python):
def main():
  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 {}".format(AC))
  print("WA x {}".format(WA))
  print("TLE x {}".format(TLE))
  print("RE x {}".format(RE))



if __name__ == "__main__":
    main()

Solution (Python):
a=int(input())
list1=[0]*4
list2=['AC','WA','TLE','RE']
for i in range(a) :
  b=input()
  if b=='AC' :
    list1[0]+=1
  elif b=='WA' :
    list1[1]+=1
  elif b=='TLE' :
    list1[2]+=1
  else :
    list1[3]+=1

for i in range(4) :
  print(list2[i]+' x '+str(list1[i]))

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

for i in range(N):
    txt = input()
    if txt == "AC":
        AC += 1
    elif txt == "WA":
        WA += 1
    elif txt == "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())
count = [0]*4
for i in range(N):
  s = input()
  if s=='AC':
    count[0] += 1
  elif s=='WA':
    count[1] += 1
  elif s=='TLE':
    count[2] += 1
  else:
    count[3] += 1
    
for i,j in enumerate(count):
  if i==0:
    print('AC x',j)
  elif i==1:
    print('WA x',j)
  elif i==2:
    print('TLE x',j)
  else:
    print('RE x',j)

Solution (Python):

N = int(input())
S = list()
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
  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())
ans=[0]*4
for _ in range(n):
    s=str(input())
    if s == 'AC':
        ans[0] +=1
    elif s == 'WA':
        ans[1] += 1
    elif s == 'TLE':
        ans[2] += 1
    else:
        ans[3] += 1
print('AC x '+ str(ans[0]))
print('WA x '+ str(ans[1]))
print('TLE x '+ str(ans[2]))
print('RE x '+ str(ans[3]))

Solution (Python):
from collections import Counter

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

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

Solution (Python):
from collections import Counter
N = int(input())
S = []
for i in range(N):
    S.append(input())
c = Counter(S)

print('AC x ' + str(c['AC']))
print('WA x ' + str(c['WA']))
print('TLE x ' + str(c['TLE']))
print('RE x ' + str(c['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):

p={'AC':0,'WA':0,'TLE':0,'RE':0}
for _ in range(int(input())):
    
    s=input()
        
    p[s]=p[s]+1
for i in p:
    print("{} x {}".format(i,p[i]))

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

l = []
for i in range(N):
    l.append(input())

for ind in ["AC", "WA", "TLE", "RE"]:
    n = l.count(ind)
    print(ind + " x " + str(n))

Solution (Python):
N = int(input())
S = []
AC,WA,TLE,RE = 0,0,0,0

for _ in range(N):
    S.append(input())

for i in range(N):
    if S[i] == "AC":
        AC += 1
    elif S[i] == "WA":
        WA += 1
    elif S[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())
s = []
for i in range(N):
  S=input()
  s.append(S)
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())
C0 = 0
C1 = 0
C2 = 0
C3 = 0

for i in range(N):
    a = input()
    if a == 'AC':
        C0 += 1
    if a == 'WA':
        C1 += 1
    if a == 'TLE':
        C2 += 1
    if a == 'RE':
        C3 += 1
print(f'AC x {C0}')
print(f'WA x {C1}')
print(f'TLE x {C2}')
print(f'RE x {C3}')

Solution (Python):

import sys
input = sys.stdin.readline
N = int(input())
ac =0
tle =0
wa =0
re =0
for i in range(N):
    S =input().strip()
    if S=="AC":
        ac +=1
    elif S=="TLE":
        tle +=1
    elif S=="WA":
        wa +=1
    elif S=="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 = 0
WA = 0
TLE = 0
RE = 0

for _ in range(n):
  judge = input()
  if judge == 'AC':
    AC += 1
  elif judge == 'WA':
    WA += 1
  elif judge == 'TLE':
    TLE += 1
  elif judge == 'RE':
    RE += 1

print('AC x {}'.format(AC))
print('WA x {}'.format(WA))
print('TLE x {}'.format(TLE))
print('RE x {}'.format(RE))

Solution (Python):
import collections

N=int(input())
list=[]

for i in range(0,N) :
  a = input()
  list.append(a)

c = collections.Counter(list)

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

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

Solution (Python):


def main():
    N = int(input())
    S = [input() for i in range(N)]

    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')))


if __name__ == "__main__":
    main()

Solution (Python):
n=int(input())
A=0
W=0
T=0
R=0
for i in range(n):
	a=input()
	if a=='AC':
		A+=1
	if a=='WA':
		W+=1
	if a=='TLE':
		T+=1
	if a=='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):
import collections

n=int(input()) 
s = []
c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i in range(n):
    tmp=input()
    s.append(tmp)

c = collections.Counter(s)

c0 = c['AC']
c1 = c['WA']
c2 = c['TLE']
c3 = c['RE']


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 = [list(input()) for _ in range(n)]
ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
    if s[i][0] == 'A':
        ac += 1
    elif s[i][0] == 'W':
        wa += 1
    elif s[i][0] == 'T':
        tle += 1
    elif s[i][0] == 'R':
        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())

d = {"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  c = input()
  d[c]=d[c]+1 
print("AC x "+str(d["AC"]))
print("WA x "+str(d["WA"]))
print("TLE x "+str(d["TLE"]))
print("RE x "+str(d["RE"]), end='')

Solution (Python):
N = int(input())
S=[]
for i in range(N):
    S.append(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())
count=[0]*4

for i in range(n):
    s=input()
    if s=="AC":
        count[0]+=1
    elif s=="WA":
        count[1]+=1
    elif s=="TLE":
        count[2]+=1
    else:
        count[3]+=1


results=["AC", "WA", "TLE", "RE"]

for i in range(4):
    txt="{0} x {1}".format(results[i], count[i])
    print(txt)

Solution (Python):
N = int(input())
S = [0]*4
for i in range(N):
    C = str(input())
    if C == 'AC':
        S[0] += 1
    elif C == 'WA':
        S[1] += 1
    elif C == 'TLE':
        S[2] += 1
    elif C == '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):
N = int(input())
S = []
for i in range(N):
  S.append(input())

ac = wa = tle = 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 {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))

Solution (Python):
N = int(input())
dic = {"AC":0, "WA":0, "TLE":0, "RE":0}
for _ in range(N):
    s = input()
    dic[s] += 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())
ans = {
    'AC': 0,
    'WA': 0,
   	'TLE': 0,
   	'RE': 0
}

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

for i in list(ans.keys()):
  print(i + ' x '+str(ans[i]))

Solution (Python):
N = int(input())
S = []
for i in range(N):
    S.append(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"))

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

for k,v in s.items():
	print("{} x {}".format(k,v))

Solution (Python):
N=int(input())
a,w,t,r=0,0,0,0
for i in range(N):
    S=input()
    if S=='AC':
        a+=1
    elif S=='WA':
        w+=1
    elif S=='TLE':
        t+=1
    elif S=='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):
from collections import Counter

N = int(input())
S = []
for i in range(N):
    s_in = input()
    
    S.append(s_in)

counter = Counter(S)
for ans in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{ans} x {counter[ans]}')

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

Solution (Python):
from collections import Counter
N=int(input())

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

A=Counter(S)

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

Solution (Python):
N = int(input())
L = ["AC", "WA", "TLE", "RE"]
p = [0] * 4

for i in range(N):
    s = input()
    if s == "AC":
        p[0] += 1
    if s == "WA":
        p[1] += 1
    if s == "TLE":
        p[2] += 1
    if s == "RE":
        p[3] += 1

for i in range(len(L)):
    print(L[i], "x", p[i])

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

d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(N):
    s = input()
    d[s] += 1

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

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

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

Solution (Python):
n = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
    s = input()
    d[s] += 1
for k, v in d.items():
    print(f'{k} x {v}')
exit()

Solution (Python):
n = int(input())
a = [input() for i 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())

L = [0] * 4

for i in range(N):
    S = input()
    if S == 'AC':
        L[0] += 1
    elif S == 'WA':
        L[1] += 1
    elif S == 'TLE':
        L[2] += 1
    else:
        L[3] += 1

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

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

for k, v in a.items():
    print(f'{k} x {v}')

Solution (Python):
n=int(input())
s_list=[]

for i in range(n):
    s_list.append(input())
    

c_0=s_list.count("AC")
c_1=s_list.count("WA")
c_2=s_list.count("TLE")
c_3=s_list.count("RE")

print("AC x",c_0)
print("WA x",c_1)
print("TLE x",c_2)
print("RE x",c_3)

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

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

Solution (Python):
n=int(input())
judge={'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(n):
  j=input()
  judge[j]+=1
for k, v in judge.items():
  print('{0} x {1}'.format(k,v))

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

count_list = [0]*4
count_list[0] = S.count('AC')
count_list[1] = S.count('WA')
count_list[2] = S.count('TLE')
count_list[3] = S.count('RE')

print('AC x' , count_list[0])
print('WA x' , count_list[1])
print('TLE x' , count_list[2])
print('RE x' , count_list[3])

Solution (Python):
from sys import stdin


def readline_from_stdin() -> str:
    return stdin.readline().rstrip


if __name__ == '__main__':
    N = int(input())
    S = [input() for i in range(0, 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())
book={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
    s=input()
    book[s]+=1
print("AC x "+ str(book["AC"]))
print("WA x "+ str(book["WA"]))
print("TLE x "+ str(book["TLE"]))
print("RE x "+ str(book["RE"]))

Solution (Python):
N = int(input())
S = [input() for _ 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):
def main():
        N = int(input())
        S = [input() for i in range(N)]

        n_ac = 0
        n_wa = 0
        n_tle = 0
        n_re = 0

        for i in range(N):
                temp = S[i]
                if temp=="AC":
                        n_ac+=1
                elif temp=="WA":
                        n_wa+=1
                elif temp=="TLE":
                        n_tle+=1
                else:
                        n_re+=1

        print("AC x",n_ac)
        print("WA x",n_wa)
        print("TLE x",n_tle)
        print("RE x",n_re)

main()

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

for _ in range(N):
  s = input()
  if(s=="AC"):ac+=1
  if(s=="TLE"):tle+=1
  if(s=="WA"):wa+=1
  if(s=="RE"):re+=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())

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

for i in range(0, N):
    s = input()
    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())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(1, N+1):
    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())
S=[0]*4
for i in range(n):
  s=input()
  if s=="AC":
    S[0]+=1
  elif s=="WA":
    S[1]+=1
  elif s=="TLE":
    S[2]+=1
  else:
    S[3]+=1

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

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

print('AC x {}'.format(A.count('AC')))
print('WA x {}'.format(A.count('WA')))
print('TLE x {}'.format(A.count('TLE')))
print('RE x {}'.format(A.count('RE')))

Solution (Python):
n = int(input())
s = []
for _ in range(n):
  s.append(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())
s = [input() for i in range(n)]

cnt_ac = s.count('AC')
cnt_wa = s.count('WA')
cnt_tle = s.count('TLE')
cnt_re = s.count('RE')

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

Solution (Python):
import sys

input = sys.stdin.readline

def main():
    ans = 0
    N = int(input())
    ans = [0, 0, 0, 0]
    S = ['AC', 'WA', 'TLE', 'RE']
    for i in range(N):
        s = input().rstrip('\n')
        ans[S.index(s)] += 1
    print(f'AC x {ans[0]}')
    print(f'WA x {ans[1]}')
    print(f'TLE x {ans[2]}')
    print(f'RE x {ans[3]}')

if __name__ == '__main__':
    main()

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):
def main():
    n = int(input())
    results = {"AC":0,"WA":0,"TLE":0,"RE":0}
    for i in range(n):
        r = input()
        results[r] += 1
    print("AC x " + str(results["AC"]))
    print("WA x " + str(results["WA"]))
    print("TLE x " + str(results["TLE"]))
    print("RE x " + str(results["RE"]))


if __name__ == '__main__':
    main()

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

ac = str(S.count("AC"))
wa = str(S.count("WA"))
tle = str(S.count("TLE"))
re = str(S.count("RE"))

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

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

Solution (Python):
def resolve():
    import sys
    input = sys.stdin.readline
    
    n = int(input())
    
    
    
    
    
    
    
    

    cnt0 = 0
    cnt1 = 0
    cnt2 = 0
    cnt3 = 0
    for _ in range(n):
        ans = input().rstrip()
        if ans == "AC":
            cnt0 += 1
        elif ans == "WA":
            cnt1 += 1
        elif ans == "TLE":
            cnt2 += 1
        elif ans == "RE":
            cnt3 += 1

    print("AC x " + str(cnt0))
    print("WA x " + str(cnt1))
    print("TLE x " + str(cnt2))
    print("RE x " + str(cnt3))

resolve()

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

ac=0
wa=0
tle=0
re=0
for i in li:
    if i=="AC":
        ac+=1
    elif i =="TLE":
        tle+=1
    elif i=="WA":
        wa+=1
    else:
        re+=1
print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

Solution (Python):
def main():
  N = int(input())
  C = [0, 0, 0, 0]
  ANS = ["AC", "WA", "TLE", "RE"]
  for i in range(N):
    s = str(input())
    if s == "AC":
      C[0] += 1
    elif s == "WA":
      C[1] += 1
    elif s == "TLE":
      C[2] += 1
    elif s == "RE":
      C[3] += 1
  for i in range(4):
    print(ANS[i] + " x " + str(C[i]) )
    
if __name__ == "__main__":
  main()

Solution (Python):
N = int(input())
S = []
count = [0,0,0,0]
for i in range(N):
    temp = input()
    if temp=="AC":
        count[0]+=1
    elif temp=="WA":
        count[1]+=1
    elif temp=="TLE":
        count[2]+=1
    else:
        count[3]+=1
print("AC x "+str(count[0]))
print("WA x "+str(count[1]))
print("TLE x "+str(count[2]))
print("RE x "+str(count[3]))

Solution (Python):

N = int(input())
dct = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(N):
    s = input()
    dct[s] += 1

for k, v in dct.items():
    print(str(k) + ' x ' + str(v))

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

print("AC","x",a[0])
print("WA","x",a[1])
print("TLE","x",a[2])
print("RE","x",a[3])

Solution (Python):
n = int(input())
a = [0 for i in range(4)]
b = ["AC", "WA", "TLE", "RE"]
for i in range(n):
  s = input()
  for j in range(4):
    if s == b[j]:
      a[j] += 1
for i in range(4):
  print(b[i], "x", a[i])

Solution (Python):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    A = input()
    if A == 'AC':
        AC += 1
    elif A == 'WA':
        WA += 1
    elif A == '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())
ac,wa,tle,re = 0,0,0,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())

result = {}
for _ in range(N):
  s = input()
  result[s] = result.get(s, 0) + 1

print(f"AC x {result.get('AC', 0)}")
print(f"WA x {result.get('WA', 0)}")
print(f"TLE x {result.get('TLE', 0)}")
print(f"RE x {result.get('RE', 0)}")