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 collections

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

for i in range(N):
  j = input()
  judge.append(j)



count = collections.Counter(judge)



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())
result = [input() for i in range(N)]
def f(s, result):
    return '%s x %d'%(s, result.count(s))
print(f('AC', result))
print(f('WA', result))
print(f('TLE', result))
print(f('RE', result))

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

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

for i in range(N):
    S = input()
    d[S] = d.get(S, 0) + 1

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

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):
T = {"AC":0, "WA":0, "TLE":0, "RE":0}
N = int(input())
for i in range(N):
    s = input()
    T[s] += 1

for i, j in T.items():
    print("{0} x {1}".format(i ,j))

Solution (Python):
N=int(input())
dic={}
dic['AC']=0
dic['WA']=0
dic['TLE']=0
dic['RE']=0


for i in range (N):
    _=input()
    dic[_]+=1


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

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

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
    elif s[i]=="RE":
        re += 1

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

Solution (Python):
N = int(input())
s = [input() for i in range(N)]
a, w, t, r = 0, 0, 0, 0
for i in range(N):
  if s[i] == "AC":
    a += 1
  elif s[i] == "WA":
    w += 1
  elif s[i] == "TLE":
    t += 1
  else:
    r += 1
print("AC x "+str(a), "WA x "+str(w), "TLE x "+str(t), "RE x "+str(r), sep="\n")

Solution (Python):
n=eval(input())
arr=[]
for i in range(n):
    arr+=[input()]
a=arr.count("AC")
b=arr.count("WA")
c=arr.count("TLE")
d=arr.count("RE")
print("AC x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))

Solution (Python):
n=int(input())
lists=[]
for i in range(n):
  lists.append(input())
AC=lists.count('AC')
WA=lists.count('WA')
TLE=lists.count('TLE')
RE=lists.count('RE')
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())
a = [0,0,0,0]
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 ",end="")
print(a[0])
print("WA x ",end="")
print(a[1])
print("TLE x ",end="")
print(a[2])
print("RE x ",end="")
print(a[3])

Solution (Python):
import sys

def main():
    input = sys.stdin.readline

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

    for _ in range(N):
        S.append(input())
    print("AC"+" x "+ str(S.count('AC\n')))
    print("WA"+" x "+ str(S.count('WA\n')))
    print("TLE"+" x "+ str(S.count('TLE\n')))
    print("RE"+" x "+ str(S.count('RE\n')))


    return


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
l = [None]*n
for i in range(n):
    l[i] = input()
from collections import Counter
c = Counter(l)
for k in ("AC", "WA", "TLE", "RE"):
    print("%s x %s" % (k, c[k] if k in c else 0))

Solution (Python):
N = int(input())
count = [0,0,0,0]
status = ['AC', 'WA', 'TLE', 'RE']
for i in range(N):
    S = input()
    for j in range(4):
        if S == status[j]: count[j]+=1

for j in range(4):
    print(status[j], 'x', count[j])

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

for _ in range(loop):
  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):
N = int(input())

dic = {}
for i in range(N):
    s = input()
    
    if s not in dic:
        dic[s] = 1
    else:
        dic[s] += 1

if 'AC' not in dic:
    dic['AC'] = 0
if 'WA' not in dic:
    dic['WA'] = 0
if 'TLE' not in dic:
    dic['TLE'] = 0
if 'RE' not in dic:
    dic['RE'] = 0
    
AC = dic['AC']
print(f'AC x {AC}')

WA = dic['WA']
print(f'WA x {WA}')

TLE = dic['TLE']
print(f'TLE x {TLE}')

RE = dic['RE']
print(f'RE x {RE}')

Solution (Python):
import collections

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

count = collections.Counter(S)
for s in ['AC', 'WA', 'TLE', 'RE']:
    n = count[s]
    print(f'{s} x {n}')

Solution (Python):
a = int(input())
X = [input() for i in range(a)]
ac = X.count('AC') 
wa = X.count('WA')
tle = X.count('TLE')
re = X.count('RE')
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 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



ans="AC x "+str(AC)+"\n"+"WA x "+str(WA)+"\n"+"TLE x "+str(TLE)+"\n"+"RE x "+str(RE)+"\n"
print("{}".format(ans))

Solution (Python):
n = int(input())
t = {"AC":0, "WA":1, "TLE":2, "RE":3}
u = ["AC", "WA", "TLE", "RE"]
ans = [0]*4
for _ in range(n):
    ans[t[input()]] += 1
for i in range(4):
    print(u[i], "x", ans[i])

Solution (Python):
rows = int(input())
x = [input() for i in range(rows)]
print("AC x"+ " " + str(x.count("AC")))
print("WA x"+ " " +  str(x.count("WA")))
print("TLE x"+ " " +  str(x.count("TLE")))
print("RE x"+ " " +  str(x.count("RE")))

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

n_ac = S.count("AC")
n_wa = S.count("WA")
n_tle = S.count("TLE")
n_re = S.count("RE")

print(f"AC x {n_ac}")
print(f"WA x {n_wa}")
print(f"TLE x {n_tle}")
print(f"RE x {n_re}")

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

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

c = collections.Counter(S_list)

C_0 = c['AC']
C_1 = c['WA']
C_2 = c['TLE']
C_3 = c['RE']

print('AC x {}'.format(C_0))
print('WA x {}'.format(C_1))
print('TLE x {}'.format(C_2))
print('RE x {}'.format(C_3))

Solution (Python):
N = int(input())
data = [input() for x in range(N)]

keys_list = ['AC','WA','TLE','RE']
check_list = {'AC':0,'WA':0,'TLE':0,'RE':0}

for x in data:
    check_list[x] = check_list[x] + 1

for x in keys_list:
    print('{} x {}'.format(x,check_list[x]))

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

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

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

for i in S:
    count[i] += 1

ans = 'AC x ' + str(count['AC']) + '\n' + 'WA x ' + str(count['WA']) + '\n' + 'TLE x ' + str(count['TLE']) + '\n' + 'RE x ' + str(count['RE'])

print(ans)

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

Solution (Python):
N=int(input())
AC=0
TLE=0
WA=0
RE=0
for i in range(N):
    x=input()
    if x == "AC":
        AC += 1
    elif x == "TLE":
        TLE+=1
    elif x=="WA":
        WA+=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 = 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
    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())
a=0
b=0
c=0
d=0
for _ 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 ',end='')
print(a)
print('WA x ',end='')
print(b)
print('TLE x ',end='')
print(c)
print('RE x ',end='')
print(d)

Solution (Python):
n = int(input())
s = [input() for _ in range(n)]
ans = {}
for i in range(n):
    if s[i] in ans.keys():
        ans[s[i]] += 1
    else:
        ans[s[i]] = 1


if 'AC' in ans.keys():
    print('AC x %d' % ans['AC'])
else:
    print('AC x %d' % 0)

if 'WA' in ans.keys():
    print('WA x %d' % ans['WA'])
else:
    print('WA x %d' % 0)

if 'TLE' in ans.keys():
    print('TLE x %d' % ans['TLE'])
else:
    print('TLE x %d' % 0)

if 'RE' in ans.keys():
    print('RE x %d' % ans['RE'])
else:
    print('RE x %d' % 0)

Solution (Python):
from sys import stdin, setrecursionlimit, stdout




def ii(): return int(stdin.readline())
def fi(): return float(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def fmi(): return map(float, stdin.readline().split())
def li(): return list(mi())
def si(): return stdin.readline().rstrip()
def lsi(): return list(si())

res=['YES', 'NO']





test_case=1
while test_case:
    test_case-=1

    a=w=t=r=0


    for _ in range(ii()):
        x=lsi()
        if x[0]=='A':
            a+=1
        elif x[0]=='W':
            w+=1
        elif x[0]=='T':
            t+=1
        else:
            r+=1
    print('AC x', a)
    print('WA x', w)
    print('TLE x', t)
    print('RE x', r)

Solution (Python):

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

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

for i in S:
    if i in dic:
        dic[i] += 1
    else:
        dic[i] = 1

for key, value in dic.items():
    print("{} x {}".format(key, value))

Solution (Python):

N=int(input())
ac=0
wa=0
tle=0
re=0
for _ in range(N):
    c=input()
    if c=='AC':
        ac+=1
    elif c=='WA':
        wa+=1
    elif c=='TLE':
        tle+=1
    elif c=='RE':
        re+=1
            

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

Solution (Python):



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


def main():
    l = ["AC", "WA", "TLE", "RE"]
    d = {x: 0 for x in l}
    for s in S:
        d[s] += 1
    for x in l:
        ans = "{} x {}".format(x, d[x])
        print(ans)


if __name__ == "__main__":
    main()

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

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

AC_cnt = li.count('AC')
WA_cnt = li.count('WA')
TLE_cnt = li.count('TLE')
RE_cnt = li.count('RE')

print(f'AC x {AC_cnt}')
print(f'WA x {WA_cnt}')
print(f'TLE x {TLE_cnt}')
print(f'RE x {RE_cnt}')

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 i 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 '+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)]
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
  elif i=="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())
cnt1 = 0
cnt2 = 0
cnt3 = 0
cnt4 = 0
for i in range(N):
  s = input()
  if s == 'AC':
    cnt1 += 1
  elif s == 'WA':
    cnt2 += 1
  elif s == 'TLE':
    cnt3 += 1
  elif s == 'RE':
    cnt4 += 1
print("AC x",cnt1)
print("WA x",cnt2)
print("TLE x",cnt3)
print("RE x",cnt4)

Solution (Python):
N = int(input()) 
s = [input() for i in range(N)] 
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0

for i in range(len(s)):
    if s[i] == 'AC':
        count_AC += 1
    elif s[i] == "WA":
        count_WA += 1
    elif s[i] == "TLE":
        count_TLE += 1
    else:
        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())
judge = []
for s in range(N):
    judge.append(input())

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

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

for x in ['AC','WA','TLE','RE']:
  print(x+' x '+str(s.count(x)))

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

a = 0
b = 0
c = 0
d = 0

for i in range(n):
  s = input()
  if s == "AC":
    a += 1
  elif s == "WA":
    b += 1
  elif s == "TLE":
    c += 1
  elif s == "RE":
    d += 1
    
print("AC x " + str(a))
print("WA x " + str(b))
print("TLE x " + str(c))
print("RE x " + str(d))

Solution (Python):
N = int(input())
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0
for _ in range(N):
  x = input()
  if x == 'AC':
    count_AC += 1
  elif x == 'WA':
    count_WA += 1
  elif x == 'TLE':
    count_TLE += 1
  else:
    count_RE += 1
print('AC x {}'.format(count_AC))
print('WA x {}'.format(count_WA))
print('TLE x {}'.format(count_TLE))
print('RE x {}'.format(count_RE))

Solution (Python):
import collections

def main():
    n = int(input())
    s_list = []
    for _ in range(n):
        s_list.append(input())
    c = collections.Counter(s_list)

    for result in ["AC", "WA", "TLE", "RE"]:
        print("{0} x {1}".format(result, c[result]))

if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
result = []
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    result.append(input())
    if result[i] == "AC":
        AC += 1
    elif result[i] == "WA":
        WA += 1
    elif result[i] == "TLE":
        TLE += 1
    elif result[i] == "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):
import sys

DEBUG = False
if DEBUG:
    f=open("202007_1st/B_input.txt")
else:
    f=sys.stdin
N=int(f.readline())
V=[f.readline().strip() for _ in range(N)]
R=[0,0,0,0]
for _ in range(N):
    if V[_]=='AC':
        R[0]+=1
    elif V[_]=='WA':
        R[1]+=1
    elif V[_]=='TLE':
        R[2]+=1
    elif V[_]=='RE':
        R[3]+=1
    else:
        pass
print("AC x {0}".format(R[0]))
print("WA x {0}".format(R[1]))
print("TLE x {0}".format(R[2]))
print("RE x {0}".format(R[3]))
f.close()

Solution (Python):
import collections

N = int(input())
S = [input() for i in range(N)]
C = collections.Counter(S)

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

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

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

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

for i in range(0, N):
    inp = input()
    if (inp=='AC'):
        AC = AC + 1
        continue
   
    if (inp=='WA'):
        WA = WA + 1
        continue
    
    if (inp=='TLE'):
        TLE = TLE + 1
        continue
        
    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):


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

N = (int)(input())
count = [0,0,0,0]

for i in range(N):
    inp = input()
    if inp in judge:
        count[judge.index(inp)] += 1
    else:
        continue
        
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)]
x=["AC","WA","TLE","RE"]

for i in x:
    print("{} x ".format(i)+str(s.count(i)))

Solution (Python):
n=int(input())
word_list = ['AC','WA','TLE','RE']
A = 0
W = 0
T = 0
R = 0

for i in range(n):
    s = input()
    if s == 'AC':
        A = A + 1
    elif s == 'WA':
        W = W + 1
    elif s == 'TLE':
        T = T + 1
    else:
        R = R + 1
Ans_list = [A,W,T,R]
for i in range(4):
    print(str(word_list[i])+ ' x '+ str(Ans_list[i]))

Solution (Python):
N = int(input())
L = []
for i in range(N):
  L.append(input())
a = 0
b = 0
c = 0
d = 0
for i in L:
  if i == 'AC':
    a += 1
  elif i == 'WA':
    b += 1
  elif i == 'TLE':
    c += 1
  elif 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):
def main():
  num = int(input())
  result = []
  for i in range(num):
    result.append(input())
  print(f'AC x {result.count("AC")}')
  print(f'WA x {result.count("WA")}')
  print(f'TLE x {result.count("TLE")}')
  print(f'RE x {result.count("RE")}')
  return

main()

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

Solution (Python):
count = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(count):
    word = input()
    if word =="AC":
        ac += 1
    elif word =="WA":
        wa += 1
    elif word =="TLE":
        tle += 1
    elif word =="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())
str_list = [input() for _ in range(n)]
print('AC x',str_list.count('AC'))
print('WA x',str_list.count('WA'))
print('TLE x',str_list.count('TLE'))
print('RE x',str_list.count('RE'))

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

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

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

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

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

S = []
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for _ in range(N):
    S.append(input()) 
   
for i in range(len(S)):
  if S[i] == "AC":
    c0 += 1
  if S[i] == "WA":
    c1 += 1
  if S[i] =="TLE":
    c2 += 1
  if S[i] == "RE":
    c3 +=1
    
print("AC x ", c0)
print("WA x " ,c1)
print("TLE x ", c2)
print("RE x ", c3)

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

AC_count = 0
WA_count = 0
TLE_count = 0
RE_count = 0

for i in range(N):
  S = input()
  if S == 'AC':
    AC_count = AC_count + 1
  elif S == 'WA':
    WA_count = WA_count + 1
  elif S == 'TLE':
    TLE_count = TLE_count + 1
  else:
    RE_count = RE_count + 1

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())
count = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
    count[input()] += 1
print('AC x {}'.format(count['AC']))
print('WA x {}'.format(count['WA']))
print('TLE x {}'.format(count['TLE']))
print('RE x {}'.format(count['RE']))

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

a=0
w=0
t=0
r=0
for i in range(n):
  s=input()
  if s=='AC':
    a=a+1
  if s=='WA':
    w=w+1
  if s=='TLE':
    t=t+1
  if s=='RE':
    r=r+1

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

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

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

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

for j, k in judge.items():
  print(j + " x " + str(k))

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

for _ in range(N):
    s = input()
    test[s] += 1

for i, j in test.items():
    print("{} x {}".format(i, j))

Solution (Python):


import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union









from collections import defaultdict          





















def main():
    Num = Union[int, float]
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input():  return sys.stdin.readline().rstrip()
    def ii():     return int(input())
    def isp():    return input().split()
    def mi():     return map(int, input().split())
    def mi_0():   return map(lambda x: int(x)-1, input().split())
    def lmi():    return list(map(int, input().split()))
    def lmi_0():  return list(map(lambda x: int(x)-1, input().split()))
    def li():     return list(input())
    def debug(x): print(x, file=sys.stderr)
    
    
    
    n = ii()
    d = defaultdict(int)

    for _ in range(n):
        s = input()
        d[s] += 1
    
    for result in ('AC', 'WA', 'TLE', 'RE'):
        print(f"{result} x {d[result]}")


if __name__ == "__main__":
    main()

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

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

Solution (Python):
N = int(input())
result = [0,0,0,0]
for n 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
name = ["AC","WA","TLE","RE"]
for res,nam in zip(result,name):
    print("%s x %d"%(nam,res))

Solution (Python):
import collections
N=int(input())
l=[input() for _ in range(N)]
tmp = collections.Counter(l)
print('AC','x',tmp["AC"])
print('WA','x',tmp["WA"])
print('TLE','x',tmp["TLE"])
print('RE','x',tmp["RE"])

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

for i in range(N):
  jud = input()
  li.append(jud)
a=li.count('AC')
w=li.count('WA')
t=li.count('TLE')
r=li.count('RE')




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())
result = [input() for i in range(n)]
a=0
w=0
t =0
r=0

for i in range(n):
    if result[i]=="AC":
        a += 1
    elif result[i]=="WA":
        w += 1
    elif result[i]=="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):
import collections
n = int(input())
S = []
for _ in range(n):
    S.append(input())
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"]))

Solution (Python):
name = ['AC','WA','TLE','RE']
counter = [0]*len(name)
N = int(input())

for i in range(N):
  txt = input()
  counter[name.index(txt)] += 1

for i in range(len(name)):
	print(name[i]+' x '+str(counter[i]))

Solution (Python):
N = int(input())
S = []
for n in range(N):
    S.append(input())
    
C = [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", 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 = []
ans = [0 for i in range(4)]
for _ in range(n):
    ss = input()
    s.append(ss)
    if ss == "AC": ans[0] += 1
    if ss == "WA": ans[1] += 1
    if ss == "TLE": ans[2] += 1
    if ss == "RE": ans[3] += 1
ac = "AC "
tle = "TLE "
wa = "WA "
re = "RE "
kakeru = "x "
ans_str = [str(i) for i in ans]
print(ac + kakeru + ans_str[0])
print(wa+kakeru+ans_str[1])
print(tle+kakeru+ans_str[2])
print(re+kakeru+ans_str[3])

Solution (Python):
from collections import Counter
n = int(input())
s = [input() for i in range(n)]
c = Counter(s)
set_s = set(s)
lists = []
lists.append(int(c["AC"]))
lists.append(int(c["WA"]))
lists.append(int(c["TLE"]))
lists.append(int(c["RE"]))
print("AC x " + str(lists[0]))
print("WA x " + str(lists[1]))
print("TLE x " + str(lists[2]))
print("RE x " + str(lists[3]))

Solution (Python):
n = int(input())
a = 0
b = 0
c = 0
d = 0
for i in range(n):
    s = str(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())
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):
rows = int(input())
x = [input() for i in range(rows)]
print("AC x {}".format(x.count('AC')))
print("WA x {}".format(x.count('WA')))
print("TLE x {}".format(x.count('TLE')))
print("RE x {}".format(x.count('RE')))

Solution (Python):
from collections import Counter
N = int(input())
S = list(input() for i in range(N)) 
my_count = Counter(S)
print('AC x {}'.format(my_count['AC']))
print('WA x {}'.format(my_count['WA']))
print('TLE x {}'.format(my_count['TLE']))
print('RE x {}'.format(my_count['RE']))

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

Solution (Python):
N=int(input())
ans = []
for i in range(N):
    ans.append(str(input()))  
a=ans.count("AC")
b=ans.count("WA")
c=ans.count("TLE")
d=ans.count("RE")
print("AC x ",a)
print("WA x ",b)
print("TLE x ",c)
print("RE x ",d)

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

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

for i in range(N):
    Si = input()
    for j in sample:
        if Si == j:
            sample[j] += 1

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

Solution (Python):
n = int(input())
casies = [str(input()) for i in range(n)]
import collections
d = collections.Counter(casies)
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())

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

for i in range (n):
    tmp = str(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())
ac =0
wa =0
tle = 0
re = 0

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

Solution (Python):
cases = []
for i in range (0, int(input())):
    cases.append(input())
test_case = ["AC", "WA", "TLE", "RE"]
for i in test_case:
    print(i+" x "+str(cases.count(i)))

Solution (Python):
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
while n > 0:
    n = n - 1
    s = input()
    if s == "AC":
        c0 = c0 + 1
    elif s == "TLE":
        c1 = c1 + 1
    elif s == "WA":
        c2 = c2 + 1
    else:
        c3 = c3 + 1
print("AC x", c0)
print("WA x", c2)
print("TLE x", c1)
print("RE x", c3)

Solution (Python):









import os
import sys


from collections import Counter

def main():
    n = int(input())
    s = []
    for _ in range(n):
        s.append(input())
    cnt = Counter(s)
    if 'AC' in cnt.keys():
        print("AC x {}".format(cnt['AC']))
    else:
        print("AC x 0")
    if 'WA' in cnt.keys():
        print("WA x {}".format(cnt['WA']))
    else:
        print("WA x 0")
    if 'TLE' in cnt.keys():
        print("TLE x {}".format(cnt['TLE']))
    else:
        print("TLE x 0")
    if 'RE' in cnt.keys():
        print("RE x {}".format(cnt['RE']))
    else:
        print("RE x 0")
 
    



if __name__ == "__main__":
    main()

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

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