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())
ans = [0, 0, 0, 0]
s = [input() for i in range(n)]
for j in s:
  if j == "AC":
    ans[0]+=1
  elif j == "WA":
    ans[1]+=1
  elif j == "TLE":
    ans[2]+=1
  elif j == "RE":
    ans[3]+=1
num = 0
for list1 in ["AC", "WA", "TLE", "RE"]:
  print(list1 + " x " + str(ans[num]))
  num += 1

Solution (Python):
import collections

def main():
    N = int(input())
    S = []
    [S.append(input()) for i in range(N)]
    c = collections.Counter(S)
    l = ["AC", "WA", "TLE", "RE"]
    
    for i in l:
        print(i, "x", c[i])

if __name__ == "__main__":
    main()

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

Solution (Python):
n = int(input())
res = [input() for _ in range(n)]
cnt = ['AC', 'WA', 'TLE', 'RE']


for c in cnt:
    print(c, 'x', res.count(c))

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

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

Solution (Python):
ac = 0
wa = 0
tle = 0
re = 0
 
n = int(input())
 
for i in range(n):
  s = str(input())
  if s == 'AC':
    ac += 1
  elif s == 'WA':
    wa += 1
  elif s == 'TLE':
    tle += 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())
S=[]
for i in range(n):
    s=input()
    S.append(s)
from collections import Counter
c0=c1=c2=c3=0
for i in S:
    if i=="AC":
        c0+=1
    elif i=="WA":
        c1+=1
    elif i=="TLE":
        c2+=1
    elif i=="RE":
        c3+=1
print("AC x ",c0)
print("WA x ",c1)
print("TLE x ",c2)
print("RE x ",c3)

Solution (Python):
AC = 0
WA = 0
TLE = 0
RE = 0

a_list = [input() for j in range(int(input()))]

for a in a_list:
  if a == "AC":
    AC += 1
  elif a == "WA":
    WA += 1
  elif a == "TLE":
    TLE += 1
  else:
    RE += 1
  
print(f"AC x {AC}\nWA x {WA}\nTLE x {TLE}\nRE x {RE}")

Solution (Python):
n = int(input())
s = [input() for nesya in range(n)]
a,w,t,r = 0,0,0,0
for b in s:
  if b == 'AC':
    a += 1
  elif b == 'WA':
    w += 1
  elif b == 'TLE':
    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):
d = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

N = int(input())

for _ in range(N):
    key = input()
    d[key] += 1

for key, value in d.items():
    print(key + ' x ' + str(value))

Solution (Python):
n=int(input())
acount,wcount,tcount,rcount=0,0,0,0
for _ in range(n):
    ans=input()
    if ans=="AC":
        acount+=1
    elif ans=="WA":
        wcount+=1
    elif ans=="TLE":
        tcount+=1
    else:
        rcount+=1
print(f"AC x {acount:}\nWA x {wcount:}\nTLE x {tcount:}\nRE x {rcount:}")

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

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

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

print('AC x {}\nWA x {}\nTLE x {}\nRE x {}\n'.format(d['AC'], d['WA'], d['TLE'], d['RE']))

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

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

B = []

for i in range(a):
    B.append(input())

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

for i in range(a):
    if B[i] == "AC":
        AC += 1
    elif B[i] == "TLE":
        TLE += 1
    elif B[i] == "WA":
        WA += 1
    elif B[i] == "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,b,c,d=0,0,0,0
for i in range(n):
    s=input()
    if s=='AC':
        a=a+1
    elif s=='WA':
        b=b+1
    elif s=='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):
n = int(input())
lst = ['AC', 'WA', 'TLE', 'RE']
dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
  s = input()
  dic[s] += 1
for judge in lst:
  print(judge, 'x', dic[judge])

Solution (Python):
N = int(input())
l = []
for i in range(0,N):
   l.append(input()) 
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):
dic = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(int(input())):
    s = input()
    dic[s] += 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())
ac = 0
wa = 0
tle = 0
re = 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):
testc=int(input())
ac=0
wa=0
tle=0
re=0
i=0
while(i<testc):
	t=input()
	if(t=="AC"):
		ac+=1
	elif(t=="WA"):
		wa+=1
	elif(t=="TLE"):
		tle+=1
	else:
		re+=1
	i+=1
print("AC x" , ac)
print("WA x" , wa)
print("TLE x" , tle)
print("RE x" , re)

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

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

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

try:
  N = int(input())
  for i in range(N):
      result = input()
      for k in S:
          if k == result:
              S[k] += 1
except:
  pass

for k in S:
    print('%s x %d' % (k, S[k]))

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

sc=Counter(s)

for a in ["AC", "WA", "TLE", "RE"]:
    print(a, "x", sc[a])

Solution (Python):
from collections import Counter
import sys
import math
n=int(input())
l=[]
a=['AC','WA','TLE','RE']
for i in range(n):
    ele=input()
    l.append(ele)   
c=Counter(l)
for r in a:
    print(r,"x",c[r])

Solution (Python):
n = int(input())
s = [input() for i in range(n)]
ac_count,wa_count,tle_count,re_count = 0, 0, 0, 0
for i in s:
    if i == 'AC':
        ac_count += 1
    elif i == 'WA':
        wa_count += 1
    elif i == 'TLE':
        tle_count += 1
    elif i == 'RE':
        re_count += 1
    else:
        continue

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

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

Solution (Python):
N = int(input())
S = [input() for i in range(N)]
Result = ['AC', 'WA', 'TLE', 'RE']

for i in Result:
    print(i, 'x', S.count(i))

Solution (Python):
N = int(input())
S = list(input() for i in range(N))
Result = ['AC', 'WA', 'TLE', 'RE']

for i in Result:
    print(i, 'x', S.count(i))

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

for j in judge:
    print(f"{j} x {judge[j]} ")

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

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

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

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

for key, value in judge.items():
  print(key, 'x', value)

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

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]
lis = ['AC','WA','TLE','RE']
for l in lis:
  print('{} x {}'.format(l,S.count(l)))

Solution (Python):
N=int(input())
 
a=0
w=0
t=0
r=0
 
for i in range(N):
  s=input()
  if s=="AC":
    a+=1
  elif s=="WA":
    w+=1
  elif s=="TLE":
    t+=1
  else:
    r+=1

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

Solution (Python):
ls=["AC","TLE","RE","WA"]
n=int(input())
a=b=c=d=0
for i in range(n):
  s=input()
  if s==ls[0]:
    a+=1
  elif s==ls[1]:
    b+=1
  elif s==ls[2]:
    c+=1
  else:
    d+=1
print(ls[0]+" x",a)
print(ls[3]+" x",d)
print(ls[1]+" x",b)
print(ls[2]+" x",c)

Solution (Python):


xs = []
judge = ["AC","WA","TLE","RE"]
jd = {"AC":0,"WA":1,"TLE":2,"RE":3}
n = int(input())
for i in range(n):
    xs.append(input().rstrip())
xcount = [0 for i in range(4)]
for x in xs:
    xcount[jd[x]] += 1
for i in range(4):
    print(judge[i] + " x " + str(xcount[i]) )

Solution (Python):
ls=["AC","TLE","RE","WA"]
n=int(input())
a=b=c=d=0
for i in range(n):
  s=input()
  if s==ls[0]:
    a+=1
  elif s==ls[1]:
    b+=1
  elif s==ls[2]:
    c+=1
  else:
    d+=1
print(ls[0]+" x",a)
print(ls[3]+" x",d)
print(ls[1]+" x",b)
print(ls[2]+" x",c)

Solution (Python):

def q2():
    N = int(input())
    data = {}
    judges = ['AC', 'WA', 'TLE', 'RE']
    for j in judges:
        data[j] = 0

    for i in range(N):
        j = input()
        data[j] += 1

    for j in judges:
        print(f'{j} x {data[j]}')


q2()

Solution (Python):
from collections import Counter

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

D = Counter(list_s)

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())
cnt = [0] * 4
res = ["AC", "WA", "TLE", "RE"]
for i in range(n):
    cnt[res.index(input())] += 1
for i in range(4):
    print(res[i], "x", cnt[i])

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

cnt = Counter()
for _ in range(N):
    cnt[input()] += 1


print(f'AC x {cnt["AC"]}\nWA x {cnt["WA"]}\nTLE x {cnt["TLE"]}\nRE x {cnt["RE"]}')

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

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

Solution (Python):
li = ["AC", "WA", "TLE", "RE"]
from collections import defaultdict
d = defaultdict(int)
N = int(input())
for i in range(N):
  s = input()
  d[s] += 1
for an in li:
  print(f"{an} x {d[an]}")

Solution (Python):
n = int(input())
l = [0,0,0,0]
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 "+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())
s = [input() for _ in range(n)]

result = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for si in s:
    result[si] += 1

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

Solution (Python):
from collections import Counter
N=int(input())
S=[input() for i in range(N)]
s=Counter(S)
judge=["AC","WA","TLE","RE"]
for j in judge:
    print("{0} x {1}".format(j,s[j]))

Solution (Python):
n = int(input())
key = ["AC", "WA", "TLE", "RE"]
value = [0,0,0,0]
for _ in range(n):
    tmp = str(input())
    if tmp in key:
        index = key.index(tmp)
        value[index]+=1
for i in range(4):
    print("{0} x {1}".format(key[i],value[i]))

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

Solution (Python):
import collections
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    S = [input().rstrip() for _ in range(N)]
    c = collections.Counter(S)
    for tc in ["AC", "WA", "TLE", "RE"]:
        if tc in c:
            print("{} x {}".format(tc, c[tc]))
        else:
            print("{} x 0".format(tc))


if __name__ == '__main__':
    main()

Solution (Python):
from collections import defaultdict

N = int(input())
S = defaultdict(int)
for i in range(N):
    s = input().strip()
    S[s] += 1

for status in ["AC", "WA", "TLE", "RE"]:
    print("{} x {}".format(status, S[status]))

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

d = dict(AC=0, WA=0, TLE=0, RE=0)
for _ in range(N):
    S = input()
    d[S] += 1

for s in ["AC", "WA", "TLE", "RE"]:
    print(f"{s} x {d[s]}")

Solution (Python):
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
ac = 0
wa = 0
tle = 0
re = 0
for _ in range(N):
    t = S()
    if t == 'AC':
        ac += 1
    elif t == 'WA':
        wa += 1
    elif t == 'TLE':
        tle += 1
    elif t == '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())
dic = collections.defaultdict(int)
for i 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):
def int_input():
    i = list(map(int, input().split()))
    if len(i) == 1:
        return i[0]
    return i


n = int_input()

c = [0, 0, 0, 0]
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):
from collections import Counter
n,*lst = open(0).read().split()
c = Counter(lst)
for s in ['AC','WA','TLE','RE']:
    print(f"{s} x {c[s]}")

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

Solution (Python):



def main():
    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]))


if __name__ == '__main__':
    main()

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

Solution (Python):
n=int(input())
s=list(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())
an=[["AC",0],["WA",0],["TLE",0],["RE",0]]
for i in range(n):
  s=input()
  for j in an:
    if j[0]==s:
      j[1]+=1;break
      
for j in an:
  print(j[0],"x",j[1])

Solution (Python):
n = int(input())
j = {"AC": 0,"WA": 1,"TLE": 2, "RE": 3}
c = [0,0,0,0]
for i in range(n):
    c[j[input()]] += 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())
C_0 = C_1 = C_2 = C_3 = 0
for i in range(N):
  c = input()
  if c == 'AC':
    C_0 += 1
  elif c == 'WA':
    C_1 += 1
  elif c == '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())
S = [None for _ in range(N)]

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

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

print('AC x %d' %a)
print('WA x %d' %b)
print('TLE x %d' %c)
print('RE x %d' %d)

Solution (Python):
thisDict={
  "AC":0,
  "WA":0,
  "TLE":0,
  "RE":0
}
tests=int(input())
for test in range(tests):
  thisDict[input()]+=1
for word, value in thisDict.items():
  print(word + " x "+ str(value))

Solution (Python):
kind = [0, 0, 0, 0]
N = int(input())
for _ in range(N):
    line = input()
    if line == 'AC':
        kind[0] += 1
    elif line == 'WA':
        kind[1] += 1
    elif line == 'TLE':
        kind[2] += 1
    elif line == 'RE':
        kind[3] += 1

print('AC x ' + str(kind[0]))
print('WA x ' + str(kind[1]))
print('TLE x ' + str(kind[2]))
print('RE x ' + str(kind[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 += 1
    elif S == "WA":
        wa += 1
    elif S == "RE":
        re += 1
    else:
        tle += 1
print("AC x", ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)

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

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

Solution (Python):



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

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

    for e in s:
        if e == "AC":
            ac += 1
        elif e == "WA":
            wa += 1
        elif e == "TLE":
            tle += 1
        else:
            re += 1

    
    
    
    
    
    
    
    
    

    print("AC x {}".format(str(ac)))
    print("WA x {}".format(str(wa)))
    print("TLE x {}".format(str(tle)))
    print("RE x {}".format(str(re)))

if __name__ == '__main__':
    main()

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

cnt_list = []

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

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


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

Solution (Python):
n = int(input())
ac, wa, tle, re = 0, 0, 0, 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 {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))

Solution (Python):

import math
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())
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):
l=[]
for _ in range(int(input())):
    s = input()
    l.append(s)
ac,wa,tle,reg=l.count('AC'),l.count('WA'),l.count('TLE'),l.count('RE')
print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(reg))

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

Solution (Python):
x=[0,0,0,0]
y=['AC','WA','TLE','RE']
y1=' x '


n=int(input())

for i in range(n):
    a=input()  
    for i in range(4):
        if a==y[i]:
            x[i]=x[i]+1
    
for i in range(4):
    x[i]=str(x[i])
    y[i]=y[i]+y1+x[i]
    print(y[i])

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

for i in range(int(input())):
  S[input()]+=1
for k,v in S.items():
  print(k,'x',v)

Solution (Python):
x=[0,0,0,0]
y=['AC x ','WA x ','TLE x ','RE x ']

n=int(input())

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

Solution (Python):
n = int(input())
cnt = [0] * 4
for _ in range(n):
    tmp = input()
    if tmp == 'AC':
        cnt[0] += 1
    elif tmp == 'WA':
        cnt[1] += 1
    elif tmp == 'TLE':
        cnt[2] += 1
    else:
        cnt[3] += 1

j_txt = ['AC', 'WA', 'TLE', 'RE']

for i in range(4):
    print(j_txt[i] + ' x ' + str(cnt[i]))

Solution (Python):
x1=0
x2=0
x3=0
x4=0

y1='AC x '
y2='WA x '
y3='TLE x '
y4='RE x '

n=int(input())

for i in range(n):
  a=input()  
  if a=='AC':
    x1=x1+1
  if a=='WA':
    x2=x2+1
  if a=='TLE':
    x3=x3+1
  if a=='RE':
    x4=x4+1
    
x1=str(x1)
x2=str(x2)
x3=str(x3)
x4=str(x4)

y1=y1+x1
y2=y2+x2
y3=y3+x3
y4=y4+x4

print(y1)
print(y2)
print(y3)
print(y4)

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())
cnt={}
cnt['AC']=0
cnt['WA']=0
cnt['TLE']=0
cnt['RE']=0

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

Solution (Python):
from collections import defaultdict

N = int(input())
d = defaultdict(int)
for i in range(N):
    d[input()] += 1
[print(result + ' x ' + str(d[result])) for result in ['AC', 'WA', 'TLE', 'RE']]

Solution (Python):
from collections import defaultdict

N = int(input())
d = defaultdict(int)
for i in range(N):
    d[input()] += 1
results = ['AC', 'WA', 'TLE', 'RE']
for result in results:
    print(result + ' x ' + str(d[result]))

Solution (Python):
import sys
from collections import defaultdict
input = sys.stdin.readline
inp = lambda: input().rstrip('\n')
n = int(input())
freq = defaultdict(int)
for _ in range(n):
    s = inp()
    freq[s] += 1
print('AC', 'x', freq['AC'])
print('WA', 'x', freq['WA'])
print('TLE', 'x', freq['TLE'])
print('RE', 'x', freq['RE'])

Solution (Python):



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

if __name__ == '__main__':
    main()

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

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

for i in range(n):
    s = input().rstrip()
    if s == 'AC': ans[0] += 1
    if s == 'WA': ans[1] += 1
    if s == 'TLE': ans[2] += 1
    if s == '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())
cnt = [0]*4
out = ["AC","WA","TLE","RE"]
for i in range(n):
  inp = input()
  if inp == out[0]:
    cnt[0] += 1
  if inp == out[1]:
    cnt[1] += 1
  if inp == out[2]:
    cnt[2] += 1
  if inp == out[3]:
    cnt[3] += 1
for i in range(4):
  print(out[i]+ " x " + str(cnt[i]))

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

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

for s in S:
    print("{} x {}".format(s,TC.count(s)))

Solution (Python):
import sys
input = sys.stdin.readline

n = int(input())
a = 0
b = 0
c = 0
d = 0
for i in range(n):
    s = input()

    if s == 'AC\n':
        a += 1
    elif s == 'WA\n':
        b += 1
    elif s == 'TLE\n':
        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):
from collections import Counter
n = int(input())
ans = Counter(input() for _ in range(n))
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{i} x {ans[i]}')

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

Solution (Python):
N = int(input())
S = {"AC":0, "WA":0, "TLE":0, "RE":0}
for i in range(N):
    S[input().rstrip()] += 1
for k, v in S.items():
    print(f"{k} x {v}")

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

Solution (Python):
from collections import Counter
n = int(input())
ans = Counter(input() for _ in range(n))
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{i} x {ans[i]}')

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

Solution (Python):
from sys import stdin
input = stdin.readline
n = int(input())
a = [0]*4

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

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



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

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

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

Solution (Python):
import sys
sys.setrecursionlimit(300000)
from collections import Counter

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


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

c = Counter(S)
for label in ['AC', 'WA', 'TLE', 'RE']:
    print(label, 'x', c[label])

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 '+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())
data=[input() for _ in range(N)]
for d in ["AC","WA","TLE","RE"]:
  print("{} x {}".format(d,data.count(d)))

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("AC x "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

Solution (Python):
from collections import Counter
N = int(input())
ans = Counter([input() for _ in range(N)])

for s in ['AC', 'WA', 'TLE', 'RE']:
    print(s, 'x', ans[s])

Solution (Python):
results = dict()
for t in ('AC', 'WA', 'TLE', 'RE'):
  results[t] = 0

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

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

Solution (Python):
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(int(input())):
    
    x = input()
    if x == 'AC':
        AC += 1
    elif x == 'WA':
        WA +=1
    elif x == '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):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
d = defaultdict(int)
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())
C = 4*[0]
W = ['AC', 'WA', 'TLE', 'RE']
for i in range(N):
	S = input()
	for j in range(4):
		if S==W[j]:
			C[j] += 1

for j in range(4):
	print(W[j],'x', C[j])

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

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

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

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

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

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

for i in range(N):
  ans[S[i]] += 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)]


checker = ["AC", "WA", "TLE", "RE"]
for c in checker:
    print(f"{c} x {S.count(c)}")

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

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