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

"""
Created on Sun Jul  5 21:05:16 2020

@author: asaka
"""

N = int(input())
ans = [0]*4

for n in range(N):
    h = input()
    if h == "AC":
        ans[0] += 1
    elif h == "WA":
        ans[1] += 1
    elif h == "TLE":
        ans[2] += 1
    elif h == "RE":
        ans[3] += 1
        
print("AC x ", ans[0])
print("WA x ", ans[1])
print("TLE x ", ans[2])
print("RE x ", ans[3])

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

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

c = [0, 0, 0, 0]

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


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

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

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

for i in range(N):
    j = input()
    if j == "AC":
        ac += 1
    elif j == "WA":
        wa += 1
    elif j == "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())
C0=0
C1=0
C2=0
C3=0
for i in range(n):
    s=input()

    if s=='AC':
       C0+=1
    if s=='WA':
       C1+=1
    if s=='TLE':
       C2+=1
    if 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())
a = 0
w = 0
t = 0
r = 0
l = []
for i in range(N):
    l.append(input())
for i in range(N):
    if 'AC'==l[i]:
        a += 1
    elif 'WA'==l[i]:
        w += 1
    elif 'TLE'==l[i]:
        t += 1
    else:
        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())
c = [0,0,0,0]
for i in range(n):
  x = input()
  if(x == 'AC'):
     c[0] +=1
  elif(x == 'WA'):
    c[1] +=1
  elif(x == 'TLE'):
    c[2] +=1
  elif(x == 'RE'):
    c[3] +=1
print('AC x '+ str(c[0]))
print('WA x '+ str(c[1]))
print('TLE x '+ str(c[2]))
print('RE x '+ str(c[3]))

Solution (Python):
n=int(input())
a=[]
b=[0,0,0,0]
for i in range(n):
    a.append(input())

for i in range(n):
    if a[i]=='AC':
        b[0]+=1
    elif a[i]=='WA':
        b[1]+=1
    elif a[i]=='TLE':
        b[2]+=1
    else:
        b[3]+=1
print('AC x '+str(b[0]))
print('WA x '+str(b[1]))
print('TLE x '+str(b[2]))
print('RE x '+str(b[3]))

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())
ans = [0] * 4
x = ("AC", "WA", "TLE", "RE")
for _ in range(N):
    s = input()
    ans[x.index(s)] += 1

for i, y in enumerate(x):
    print(y, "x", ans[i])

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

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

lst = []

for i in range(N):
   lst.append(input())

C0 = str(lst.count('AC'))
C1 = str(lst.count('WA'))
C2 = str(lst.count('TLE'))
C3 = str(lst.count('RE'))

result = 'AC x ' + C0 +'\nWA x ' + C1 + '\nTLE x ' + C2 + '\nRE x ' + C3

print(result)

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

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

print('AC x', AC)
print('WA x', WA)
print('TLE x', TLE)
print('RE x', RE)

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

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

for i in range(n):
    s = input()
    if s == 'AC':
        c0 = c0 + 1
    elif s == 'WA':
        c1 = c1 + 1
    elif s == 'TLE':
        c2 = c2 + 1
    else:
        c3 = c3 + 1

print('AC x ',c0)
print('WA x ',c1)
print('TLE x ',c2)
print('RE x ',c3)

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
	else:
		ans[3]+=1
print("AC x ",ans[0])
print("WA x ",ans[1])
print("TLE x ",ans[2])
print("RE x ",ans[3])

Solution (Python):
N = int(input())
ans = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(N):
    a = input()
    if a in ans.keys():
        ans[a] +=1
    else:
        ans[a] = 1

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

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

Solution (Python):
n = int(input())
s = [(str(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())
ACn, WAn, TLEn, REn = 0, 0, 0, 0
for i in range(N):
    J = input()
    if J == "AC":
        ACn += 1
    elif J == "WA":
        WAn += 1
    elif J == "TLE":
        TLEn += 1
    else:
        REn += 1
print("AC x " + str(ACn))
print("WA x " + str(WAn))
print("TLE x " + str(TLEn))
print("RE x " + str(REn))

Solution (Python):
n = int(input())
judge = {}
for i in range(n):
    s = input()
    if s in judge.keys():
        judge[s] += 1
    else:
        judge[s] = 1
judgelist = ['AC', 'WA', 'TLE', 'RE']
for p in judgelist:
    if p not in judge.keys():
        judge[p] = 0
for key in judgelist:
    print(key + ' x ' + str(judge[key]))

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

for i in range(n):
  lst.append(input())
  
print('AC x ' + str(lst.count('AC')))
print('WA x ' + str(lst.count('WA')))
print('TLE x ' + str(lst.count('TLE')))
print('RE x ' + str(lst.count('RE')))

Solution (Python):
import collections

N = int(input())

n_AC = 0
n_WA = 0
n_TLE = 0
n_RE = 0

lst = []
for _ in range(N):
  lst.append(input())
  
c = collections.Counter(lst)

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

Solution (Python):
N=int(input())
L=[0]*4
for i 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 {0}".format(L[0]))
print("WA x {0}".format(L[1]))
print("TLE x {0}".format(L[2]))
print("RE x {0}".format(L[3]))

Solution (Python):
n = int(input())
s = []
for i in range(n):
    s += [input()]
c0 = s.count("AC")
c1 = s.count("WA")
c2 = s.count("TLE")
c3 = s.count("RE")
print("AC x " + str(c0))
print("WA x " + str(c1))
print("TLE x " + str(c2))
print("RE x " + str(c3))

Solution (Python):

import sys
input = sys.stdin.readline
n = int(input())
s = []
for i in range(n):
  s.append(input().replace('\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')))

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


import sys

def main():
    n = int(input())
    answer_list=[]
    answer_list=[input() for _ in range(n)]
    AC=0
    WA=0
    TLE=0
    RE=0
    for answer in answer_list:
        if "AC" == answer:
            AC+=1
        elif "WA" == answer:
            WA+=1
        elif "TLE"==answer:
            TLE+=1
        elif "RE"==answer:
            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):
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
    elif x == '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):
from collections import defaultdict
n = int(input())
s = [input() for _ in range(n)]
table = defaultdict(int)
for i in s:
    table[i] += 1
for j in ["AC", "WA", "TLE", "RE"]:
    print(j+" "+"x"+" "+str(table[j]))

Solution (Python):





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

Solution (Python):
ans ={'AC':0, 'WA':0, 'TLE':0, 'RE':0}
N = int(input())
for _ in range(N):
    k = input()
    c = ans.setdefault(k)
    ans[k] += 1
for k,v in ans.items():
    print(f'{k} x {v}')

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

Solution (Python):
a = input()
c1 = 0
c2 = 0
c3 = 0
c4 = 0
for i in range(int(a)):
  b = input()
  if "AC" == str(b):
    c1 += 1
  elif "TLE" == str(b):
    c2 += 1
  elif "WA" == str(b):
    c3 += 1
  elif "RE" == str(b):
    c4 += 1
print("AC" , "x" , str(c1))
print("WA" , "x" ,str(c3))
print("TLE" , "x" , str(c2))
print("RE" , "x" ,str(c4))

Solution (Python):
n = int(input())
sa = [0]*n
for i in range(n):
    sa[i]= str(input())
a = 0
w =0
t=0
r=0

for s in sa:
    if s == "AC":
        a+=1
    if s == "WA":
        w+=1
    if s == "TLE":
        t+=1
    if 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):
N = int(input())
l = [input() for _ in range(N)]
from collections import Counter
m = Counter(l)
print("AC x ", m["AC"])
print("WA x ", m["WA"])
print("TLE x ", m["TLE"])
print("RE x ", m["RE"])

Solution (Python):
N = int(input())
S = [input() for i in range(N)]
C_0, C_1, C_2, C_3 = 0, 0, 0, 0
for s in S:
  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" , C_0)
print("WA x" , C_1)
print("TLE x" , C_2)
print("RE x" , C_3)

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

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

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

Solution (Python):
n = int(input())
ans = [0 for i in range(4)]
tag = ['AC', 'WA', 'TLE', 'RE']
for i in range(n):
  temp = input()
  if temp == 'AC':
    ans[0] += 1
  elif temp == 'WA':
    ans[1] += 1
  elif temp == 'TLE':
    ans[2] += 1
  else:
    ans[3] += 1
  
for i in range(4):
  print('{} x {}'.format(tag[i], ans[i]))

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

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())
s=[]
for i in range(n):
	s.append(input())
a=0
b=0
c=0
d=0
for i in range(n):
	if s[i]=="AC":
		a+=1
	elif s[i]=="WA":
		b+=1
	elif s[i]=="TLE":
		c+=1
	else:
		d+=1

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

Solution (Python):
import sys


N = int(input())


A =0
W = 0
T = 0
R = 0

for i in range(N):
    c = str(input())
    if c == "AC":
        A+=1
    elif c == "WA":
        W += 1
    elif c == "TLE":
        T += 1
    elif c == "RE":
        R += 1

print(f'AC x {A}')
print(f'WA x {W}')
print(f'TLE x {T}')
print(f'RE x {R}')

Solution (Python):
def JudgeStatusSummary():

    num = int(input())

    list_result = []

    for n in range(num):
        result = str(input())
    
        list_result.append(result)
    
    print('AC x ', list_result.count('AC'))
    print('WA x ', list_result.count('WA'))
    print('TLE x ', list_result.count('TLE'))
    print('RE x ', list_result.count('RE'))


if __name__ == '__main__':
    JudgeStatusSummary()

Solution (Python):
n=int(input())
s=[]
ac,wa,tle,re=0,0,0,0
for i in range(n):
    s.append(input())
    if s[-1]=="AC":
        ac+=1
    elif s[-1]=="TLE":
        tle+=1
    elif s[-1]=="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):
n = int(input())
d = []
for i in range(n):
    _ = str(input())
    d.append(_)

print('AC x {}'.format(d.count('AC')))
print('WA x {}'.format(d.count('WA')))
print('TLE x {}'.format(d.count('TLE')))
print('RE x {}'.format(d.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())
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, sep=' ')
print('WA', 'x', b, sep=' ')
print('TLE', 'x', c, sep=' ')
print('RE', 'x', d, sep=' ')

Solution (Python):
from collections import Counter

n = int(input())
data = []
for _ in range(n):
    data.append(input())

c = Counter(data)

print("AC x", c['AC'])
print("WA x", c['WA'])
print("TLE x", c['TLE'])
print("RE x", c['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):
a=int(input())
lists=[input() for i in range(a)]
print('AC x '+str(lists.count('AC')))
print('WA x '+str(lists.count('WA')))
print('TLE x '+str(lists.count('TLE')))
print('RE x '+str(lists.count('RE')))

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

result=[0,0,0,0]

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

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

Solution (Python):
n = int(input())
s = list(input() for i in range(n))
ac = 0
wa = 0
tle = 0
re = 0

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',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)

Solution (Python):
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 {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))

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

Solution (Python):
import collections

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

c = collections.Counter(l)
ans = [0 for _ in range(4)]

if "AC" in c.keys():
    ans[0] = c["AC"]
if "WA" in c.keys():
    ans[1] = c["WA"]
if "TLE" in c.keys():
    ans[2] = c["TLE"]
if "RE" in c.keys():
    ans[3] = c["RE"]

  
    
    
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):
p=[]
for i in range(int(input())):
   a=input()
   p.append(a)
print("AC"+" x "+ str(p.count("AC")))
print("WA"+" x " + str(p.count("WA")))
print("TLE"+" x "+ str(p.count("TLE")))
print("RE"+ " x "+ str(p.count("RE")))

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

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

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

dic = {}
dic['AC'] = 0
dic['WA'] = 0
dic['TLE'] = 0
dic['RE'] = 0

for i in s:
    if i =='AC':
        dic['AC'] += 1
    elif i =='WA':
        dic['WA'] += 1
    elif i == 'TLE':
        dic['TLE'] += 1
    else:
        dic['RE'] += 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())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
    j = input()
    if j == "AC":
        ac += 1
    elif j == "WA":
        wa += 1
    elif j == "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 = []
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0
for i in range(0, N):
    c = input()
    C.append(c)

for i in range(0, N):
    if C[i] == 'AC':
        count_AC += 1
    elif C[i] == 'WA':
        count_WA += 1
    elif C[i] == 'TLE':
        count_TLE += 1
    elif C[i] == 'RE':
        count_RE += 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())
D = dict()
D["AC"] = 0
D["WA"] = 0
D["TLE"] = 0
D["RE"] = 0
for i in range(N):
    s = input()
    D[s] += 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"]))

Solution (Python):
n = int(input())
s = [input() for _ 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())
s = [input() for _ in range(n)]
from collections import Counter
cnt = Counter(s)
for i in ['AC','WA','TLE','RE']:
    if i in cnt.keys():
        print('{}'.format(i)+' '+'x' + ' ' + '{}'.format(cnt[i]))
    else:
        print('{}'.format(i)+' '+'x' + ' ' + '0')

Solution (Python):

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

ac_count = 0
wa_count = 0
tle_count = 0
re_count = 0
for i in range(len(s)):
    if s[i] == 'AC':
        ac_count += 1
    elif s[i] == 'WA':
        wa_count += 1
    elif s[i] == 'TLE':
        tle_count += 1
    elif s[i] == 'RE':
        re_count += 1

print('AC x ',ac_count)
print('WA x ',wa_count)
print('TLE x ',tle_count)
print('RE x ',re_count)

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

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

for i in range(N):
    S = input()
    ans[S] += 1
    
for s,n in ans.items():
    print(s,"x",n)

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

AC_n = 0
WA_n = 0
TLE_n = 0
RE_n = 0

for i in range(N):
    ans = input()
    if (ans == "AC"):
        AC_n += 1
    elif(ans == "WA"):
        WA_n += 1
    elif(ans == "TLE"):
        TLE_n += 1
    elif(ans == "RE"):
        RE_n += 1

print(f'AC x {AC_n}')
print(f'WA x {WA_n}')
print(f'TLE x {TLE_n}')
print(f'RE x {RE_n}')

Solution (Python):
dict={"AC":0,"WA":0,"TLE":0,"RE":0}
n,*s=map(str,open(0).read().split())
for i in s:
  dict[i]+=1
for k, v in dict.items(): 
  print(k+" x "+str(v))

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().strip() ) ;

L = [ 'AC', 'WA', 'TLE', 'RE' ] ;
dic = {} ; 
for x in L : 
	dic[x] = 0 ;

for x in range ( N ) :
	r =  input().strip() ;
	dic[r] += 1 ; 

for x in L :
	print ( "{0} x {1}".format( x  , dic[x] ) ) ;

Solution (Python):
n = int(input())
c1 = 0
c2 = 0
c3 = 0
c4 = 0
for i in range(n):
    s = input()
    if s == 'AC':
        c1 += 1
    elif s == 'WA':
        c2 += 1
    elif s == 'TLE':
        c3 += 1
    else:
        c4 += 1
print('AC x %d' % c1)
print('WA x %d' % c2)
print('TLE x %d' % c3)
print('RE x %d' % c4)

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)

def main():
  N = int(input())
  dic = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0
  }
  for _ in range(N):
    dic[input()] += 1
  print(f'AC x { dic["AC"]}')
  print(f'WA x { dic["WA"]}')
  print(f'TLE x { dic["TLE"]}')
  print(f'RE x { dic["RE"]}')


if __name__=='__main__':
  main()

Solution (Python):
from collections import defaultdict,deque
from sys import stdin,setrecursionlimit
import heapq,bisect,math,itertools,string,queue,copy
setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, stdin.readline().split()))

N = int(input())
Sls = []
for _ in range(N):
    s = str(input())
    Sls.append(s)

Cls = [0]*4

for item in Sls:
    if item=='AC':
        Cls[0] += 1
    if item =='WA':
        Cls[1] += 1
    if item=='TLE':
        Cls[2] += 1
    if item=='RE':
        Cls[3] += 1

print('AC x {0}'.format(Cls[0]))
print('WA x {0}'.format(Cls[1]))
print('TLE x {0}'.format(Cls[2]))
print('RE x {0}'.format(Cls[3]))

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

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

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

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

for _ in range(n):
  dic[input()] += 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())

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

for i in range(N) :
  status = str(input())

  if status == "AC":
    AC += 1
  elif status == "WA": 
    WA += 1
  elif status == "TLE":
    TLE += 1
  elif status == "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())

result_dic = dict(AC=0, WA = 0, TLE = 0, RE = 0)

for n in range(N):
  s = input()
  
  result_dic[s] += 1
  
print("AC x " + str(result_dic['AC']))
print("WA x " + str(result_dic['WA']))
print("TLE x " + str(result_dic['TLE']))
print("RE x " + str(result_dic['RE']))

Solution (Python):
n = int(input())
li = [0] * n
case = ["AC", "WA", "TLE", "RE"]
for _ in range(n):
    li[_] = input()

for c in case:
    print(c + " x " + str(li.count(c)))

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())
a=0
b=0
c=0
d=0
for i in range(n):
    x=input()
    if x =="AC":
        a = a+1
    if x =="WA":
        b = b+1
    if x =="TLE":
        c = c+1
    if x =="RE":
        d = d+1
print("AC x "+str(a))
print("WA x "+str(b))
print("TLE x "+str(c))
print("RE x "+str(d))

Solution (Python):
def l_in(type_): return list(map(type_, input().split()))
def i_in(): return int(input())
def m_in(type_): return map(type_, input().split())
def r_in(n, type_): return [type_(input()) for _ in range(n)]
ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

n = i_in()
s = r_in(n, str)
for k in s:
    ans[k] += 1

for key in ans:
    print(f'{key} x {ans[key]}')

Solution (Python):
n=int(input())
counta=0
countw=0
countt=0
countr=0
for i in range(n):
    s=input()
    if s=='AC':
        counta+=1
    elif s=='WA':
        countw+=1
    elif s=='TLE':
        countt+=1
    else:
        countr+=1
print('AC x '+str(counta))
print('WA x '+str(countw))
print('TLE x '+str(countt))
print('RE x '+str(countr))

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

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

Solution (Python):
N = int(input())
s = [input() for _ in range(N)]
c0, c1, c2, c3 = s.count('AC'), s.count('WA'), s.count('TLE'), s.count('RE')
print('AC x', c0)
print('WA x', c1)
print('TLE x', c2)
print('RE x', c3)

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

count = [0,0,0,0]

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
  elif S == 'RE':
    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())
s = [input() for i in range(n)]

from collections import Counter
cnt = Counter(s)

if 'AC' in cnt:
    print('AC x ' + str(cnt['AC']))
else:
    print('AC x 0')
if 'WA' in cnt:
    print('WA x ' + str(cnt['WA']))
else:
    print('WA x 0')
if 'TLE' in cnt:
    print('TLE x ' + str(cnt['TLE']))
else:
    print('TLE x 0')
if 'RE' in cnt:
    print('RE x ' + str(cnt['RE']))
else:
    print('RE x 0')

Solution (Python):
status = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE':0}
N = int(input())
for _ in range(N):
  status[input()] += 1
for k, v in status.items():
  print("{} x {}".format(k, v))

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 {}'.format(ans[0]))
print('WA x {}'.format(ans[1]))
print('TLE x {}'.format(ans[2]))
print('RE x {}'.format(ans[3]))

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
  elif S == "RE":
    l[3] += 1
    
print("AC x", l[0])
print("WA x", l[1])
print("TLE x", l[2])
print("RE x", l[3])

Solution (Python):


import sys
import math
import time

import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools









N = int(input())
S = [0]*4

for i in range(N):
  s = str(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())

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

str_list = [input() for _ in range(N)]
count_dict={'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(N):
    count_dict[str_list[i]] += 1

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

Solution (Python):
n = int(input())
ac = wa = tle = re = 0
for _ in range(n):
    tmp = input()
    if tmp == 'AC':
        ac += 1
    elif tmp == 'WA':
        wa += 1
    elif tmp == '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):
from collections import Counter
n=int(input())
a=[input()for i in range(n)]
a.extend(["AC","TLE","WA","RE"])
c=Counter(a)

d=c["AC"]-1
e=c["WA"]-1
f=c["TLE"]-1
g=c["RE"]-1

print("{} {} {}".format("AC","x",d))
print("{} {} {}".format("WA","x",e))
print("{} {} {}".format("TLE","x",f))
print("{} {} {}".format("RE","x",g))

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
    if a == "WA":
        WA += 1
    if a == "TLE":
        TLE += 1
    if a == "RE":
        RE += 1

print("AC x",AC)
print("WA x",WA)
print("TLE x",TLE)
print("RE x",RE)

Solution (Python):

def abc173_b():
    N = int(input())

    
    l = [0 for i in range(4)]

    for i in range(N):
        Inp = input()
        if Inp == "AC":
            l[0] += 1
        if Inp == "WA":
            l[1] += 1
        if Inp == "TLE":
            l[2] += 1
        if Inp== "RE":
            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]))



abc173_b()

Solution (Python):
import collections

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

ans = ("AC", "WA", "TLE", "RE")
cnt = collections.Counter(S)

for a in ans:
    print(f"{a} x {cnt[a]}")

Solution (Python):
N = int(input())
C = [list(map(str,input().split())) for _ in range(N)]

l = [0]*4

for c in C:
  if c == ["AC"]:
    l[0] += 1
  elif c == ["WA"]:
    l[1] += 1
  elif c == ["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())
l = {
  'AC': 0,
  'WA': 0,
  'TLE': 0,
  'RE': 0
}

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

print('AC x %d' % (l['AC']))
print('WA x %d' % (l['WA']))
print('TLE x %d' % (l['TLE']))
print('RE x %d' % (l['RE']))

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