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())
judge = [input() for i in range(N)]

N_ac = judge.count('AC')
N_wa = judge.count('WA')
N_tl = judge.count('TLE')
N_re = judge.count('RE')

print('AC x ' + str(N_ac))
print('WA x '+str(N_wa))
print('TLE x '+str(N_tl))
print('RE x '+str(N_re))

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

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

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

d = Counter()

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

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

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

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

Solution (Python):
import sys

def main():

	N = int(input())
	AC = 0
	WA = 0
	TLE = 0
	RE = 0
	
	for _ 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))
		
	
if __name__ == "__main__":
    main()

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

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

for _ in range(T):
	count[str(input())] += 1

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

Solution (Python):
n = int(input())
a,b,c,d = 0,0,0,0
for i in range(n):
    p = str(input())
    if p == "AC":
        a += 1
    elif p == "WA":
        b += 1
    elif p == "TLE":
        c += 1
    elif p == "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())
j=[]
for i in range(n):
    j.append(str(input()))
print("AC x "+str(j.count("AC")))
print("WA x "+str(j.count("WA")))
print("TLE x "+str(j.count("TLE")))
print("RE x "+str(j.count("RE")))

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

Solution (Python):
numberotestcase = int(input())
verdicat=[]
for step in range(numberotestcase):
  exp = input().upper()
  verdicat.append(exp)
 
first = verdicat.count('AC')
sec =  verdicat.count('WA')
thir =  verdicat.count('TLE')
fou = verdicat.count('RE')
print('AC x '+str(first))
print('WA x '+str(sec))
print('TLE x '+str(thir))
print('RE x '+str(fou))

Solution (Python):

result = ["AC","WA","TLE","RE"]
result_num = [0,0,0,0]


case = input("")
case = int(case)

list = []
A = 0

while A < case:
  inp = input("")
  if inp == result[0] or inp == result[1] or inp == result[2] or inp == result[3]:
    list.append(inp)
    A = A + 1

A = 0
while A < case:
  if list[A] == result[0]:
    result_num[0] = result_num[0] + 1
  elif list[A] == result[1]:
    result_num[1] = result_num[1] + 1
  elif list[A] == result[2]:
    result_num[2] = result_num[2] + 1
  elif list[A] == result[3]:
    result_num[3] = result_num[3] + 1
  A =A + 1

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

Solution (Python):
AC = []
WA  = []
TLE = []
RE = []
n = int(input())
for i in range(n):
    s = input()
    if s== 'AC':
        AC.append(s)
    elif s=='WA':
        WA.append(s)
    elif s=='TLE':
        TLE.append(s)
    else:
        RE.append(s)
print(f'AC x {len(AC)}')
print(f'WA x {len(WA)}')
print(f'TLE x {len(TLE)}')
print(f'RE x {len(RE)}')

Solution (Python):
n=int(input())
a=[]
c1=c2=c3=c4=0
for i in range (0,n):
    t=input()
    a.append(t)
    if(a[i]=="AC"):
        c1+=1
    elif(a[i]=="WA"):
        c2+=1
    elif(a[i]=="TLE"):
        c3+=1
    else:
        c4+=1
print("AC x ",end="") 
print(c1)
print("WA x ",end="") 
print(c2)
print("TLE x ",end="") 
print(c3)
print("RE x ",end="") 
print(c4)

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

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

Solution (Python):
import math

def a():
    n = int(input())

    print((10000-n)%1000)


def b():
    n = int(input())
    
    count = [0]*4
    for i in range(n):
        s = input()
        if s == 'AC':
            count[0] += 1
        elif s == 'WA':
            count[1] += 1
        elif s == 'TLE':
            count[2] += 1
        else:
            count[3] += 1
    
    

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



def c():
    print('')



def d():
    print('')


b()

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 {}\nWA x {}\nTLE x {}\nRE x {}'.format(ac,wa,tle,re))

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

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

Solution (Python):
n = int(input())
ac,tle,wa,re = 0,0,0,0
for i in range(n):
    s = input()
    if s == "AC":
        ac+=1
    elif s == "TLE":
        tle+=1
    elif s == "WA":
        wa+=1
    elif s == "RE":
        re+=1
print("AC x {a}\nWA x {b}\nTLE x {c}\nRE x {d}".format(a = ac,b = wa, c = tle, d = re))

Solution (Python):
N=int(input())
C0=0
C1=0
C2=0
C3=0
for i in range(N):
  C=input()
  if C=="AC":
    C0+=1
  if C=="WA":
    C1+=1
  if C=="TLE":
    C2+=1
  if C=="RE":
    C3+=1
    
print("AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}".format(C0,C1,C2,C3))

Solution (Python):
n=int(input())
s=[input() for _ in range(n)]
print('AC x', end=' ')
print(s.count('AC'))
print('WA x', end=' ')
print(s.count('WA'))
print('TLE x', end=' ')
print(s.count('TLE'))
print('RE x', end=' ')
print(s.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
  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):


import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
def lispin(t=int):return list(pin(t))

from collections import defaultdict
def resolve():
    N,=pin()
    a=defaultdict(int)

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

    t=a["AC"]+a["WA"]+a["TLE"]+a["RE"]
    
    assert t==N
    print("AC x",a["AC"])
    print("WA x",a["WA"])
    print("TLE x",a["TLE"])
    print("RE x",a["RE"])    

resolve()

Solution (Python):

n=int(input())
slist=[]
for i in range(n):
  moji=str(input())
  slist.append(moji)
numdic={}
for chr in ["AC","WA","TLE","RE"]:
  numdic[chr]=slist.count(chr)
for chr,val in numdic.items():
  print(chr," x ",val)

Solution (Python):
import sys
a = sys.stdin.readlines()

print("AC x " + str(a.count("AC\n")))
print("WA x " + str(a.count("WA\n")))
print("TLE x " + str(a.count("TLE\n")))
print("RE x " + str(a.count("RE\n")))

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

Solution (Python):
n = int(input())
Ss = [input() for i in range(n)]
judges = ["AC","WA","TLE","RE"]
from collections import defaultdict
d = defaultdict(int)
for s in Ss:
    d[s] += 1
for j in judges:
    print("{} x {}".format(j,d[j]))

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

answer = [0 for _ in range(4)]
for i in range(N):
    if S[i] == "AC":
        answer[0]+=1
    elif S[i] == "WA":
        answer[1]+=1
    if S[i] == "TLE":
        answer[2]+=1
    if S[i] == "RE":
        answer[3]+=1

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

Solution (Python):
N = int(input())
S = []
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0
for _ in range(N):
  S.append(input())
for i in S:
  if i == "AC":
    count_AC += 1  
  elif i == "WA":
    count_WA += 1    
  elif i == "TLE":
    count_TLE += 1
  elif i == "RE":
    count_RE += 1
  else:
    pass
a = "AC" + " " + "x" + " " + str(count_AC)
b = "WA" + " " + "x" + " " + str(count_WA)
c = "TLE" + " " + "x" + " " + str(count_TLE)
d = "RE" + " " + "x" + " " + str(count_RE)
print(a, b, c, d, sep="\n")

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

ans = [0]*4
for dat in s:
    if dat == 'AC':
        ans[0] += 1
    elif dat == 'WA':
        ans[1] += 1
    elif dat == 'TLE':
        ans[2] += 1
    elif dat == 'RE':
        ans[3] += 1

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

Solution (Python):
import sys
import math
from collections import defaultdict
from bisect import bisect_left, bisect_right

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def LI(): return list(map(int, input().split()))
def LIR(row,col):
    if row <= 0:
        return [[] for _ in range(col)]
    elif col == 1:
        return [I() for _ in range(row)]
    else:
        read_all = [LI() for _ in range(row)]
        return map(list, zip(*read_all))



N = I()

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):
N = int(input())
Ac,Wa,Re,Tle = 0,0,0,0
for i in range(N):
    result = input()
    if result == "AC":
        Ac += 1
    elif result == "WA":
        Wa += 1
    elif result == "RE":
        Re += 1
    else:
        Tle += 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
N = int(input())
A = sys.stdin.readlines()
A = [b.strip() for b in A]
print('AC x ' + str(A.count('AC')))
print('WA x ' + str(A.count('WA')))
print('TLE x ' + str(A.count('TLE')))
print('RE x ' + str(A.count('RE')))

Solution (Python):
N = int(input())
s = list(input() for _ in range(N))
cntlst = ['AC', 'WA', 'TLE', 'RE']

for i in cntlst:
    print(i, 'x', s.count(i))

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

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

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

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

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

count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0

for i in range(N):
	if a[i] == 'AC':
		count_AC += 1
	if a[i] == 'WA':
		count_WA += 1
	if a[i] == 'TLE':
		count_TLE += 1
	if a[i] == 'RE':
		count_RE += 1

print('AC x ', end='')
print(count_AC)
print('WA x ', end='')
print(count_WA)
print('TLE x ', end='')
print(count_TLE)
print('RE x ', end='')
print(count_RE)

Solution (Python):
N = int(input())
s = list(input() for _ in range(N))
cntlst = ['AC', 'WA', 'TLE', 'RE']

for i in cntlst:
    print(i, 'x', s.count(i))

Solution (Python):
import sys
input = sys.stdin.readline
from collections import Counter
def main():
    N = int(input())
    cnt_list = []
    for _ in range(N):
        S = input().rstrip()
        cnt_list.append(S)
    cnt_list = Counter(cnt_list)
    keys = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
    for k, v in cnt_list.items():
        keys[k] = v
    print('AC', 'x', keys['AC'])
    print('WA', 'x', keys['WA'])
    print('TLE', 'x', keys['TLE'])
    print('RE', 'x', keys['RE'])
if __name__ == "__main__":
    main()

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

for i in range(4):
    tmp = "{0} x {1}".format(mo[i],lis[i])
    print(tmp)

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

N_ac = judge.count('AC')
N_wa = judge.count('WA')
N_tl = judge.count('TLE')
N_re = judge.count('RE')

print('AC x ' + str(N_ac))
print('WA x '+str(N_wa))
print('TLE x '+str(N_tl))
print('RE x '+str(N_re))

Solution (Python):
import math
def main():
    judge_l = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    l = int(input().rstrip())
    for i in range(l):
      judge = input().rstrip()
      judge_l[judge] += 1
    
    print('AC x {}'.format(judge_l['AC']), end='\n')
    print('WA x {}'.format(judge_l['WA']), end='\n')
    print('TLE x {}'.format(judge_l['TLE']), end='\n')
    print('RE x {}'.format(judge_l['RE']), end='')
    
if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
S = []
word_list = ["AC","WA","TLE","RE"]
for i in range(N):                     
    array = input()
    S.append(array)

for i in range(4):
  print(word_list[i] +" x "+str(S.count(word_list[i])))

Solution (Python):
N = int(input())
S = [str(input()) for i in range(N)]
a = S.count("AC")
w = S.count("WA")
t = S.count("TLE")
r = S.count("RE")
print("AC x" + " " + str(a))
print("WA x" + " " + str(w))
print("TLE x" + " " + str(t))
print("RE x" + " " + str(r))

Solution (Python):
import sys
from collections import deque
si = sys.stdin.readline


def main():
    ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
    n = int(si())
    while n > 0:
        n -= 1
        s = si()[:-1]
        ans[s] += 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']))


if __name__ == '__main__':
    main()

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):
AC="AC"
WA="WA"
TLE="TLE"
RE="RE"
n=int(input())
l=[str(input()) for i in range(n)]
a=(l.count(AC))
w=(l.count(WA))
t=(l.count(TLE))
r=(l.count(RE))
print(f"AC x {a}")
print(f"WA x {w}")
print(f"TLE x {t}")
print(f"RE x {r}")

Solution (Python):
from collections import OrderedDict

str = input()
n = int(str)
hoge = OrderedDict()

hoge['AC'] = 0
hoge['WA'] = 0
hoge['TLE'] = 0
hoge['RE'] = 0

for i in range(n):
    str = input()
    a = 1
    if str in hoge:
        a = hoge[str] + 1
    hoge[str] = a

for k, v in hoge.items():
    print(k, 'x', 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):
import itertools
import functools
import math
from collections import Counter
from itertools import combinations
import re

N = int(input())

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

c = Counter(M)

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):
a=int(input())
dic={}
dic['AC']=0
dic['WA']=0
dic['TLE']=0
dic['RE']=0
for i in range(a):
  s=input()
  dic[s]=dic[s]+1
print("AC x "+str(dic['AC']))
print("WA x "+str(dic['WA']))
print("TLE x "+str(dic['TLE']))
print("RE x "+str(dic['RE']))

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

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

wa = 0
tle = 0
re = 0
while (N) :
    x = input()
    if x == 'AC':
        ac+=1
    if x == 'WA':
        wa +=1
    if x == 'TLE':
        tle += 1
    if x == 'RE':
        re += 1
    N-=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())
stuff = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(N):
  a = input()
  stuff[a] = stuff[a]+1
for v in stuff:
  print(str(v)+str(" x ")+str(stuff[v]))

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

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

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

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())
c0=[]
c1=[]
c2=[]
c3=[]
for i in range(N):
    S = input()
    if S == "AC":
        c0.append(S)
    elif S == "WA":
        c1.append(S)
    elif S == "TLE":
        c2.append(S)
    elif S == "RE":
        c3.append(S)

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

Solution (Python):
n = int(input())
s = []
for  _ 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 ", a)
print("WA x ", b)
print("TLE x ", c)
print("RE x ", d)

Solution (Python):
N=int(input())
S = []
for _ in range(N):
    S.append(input())
A=S.count('AC')
W=S.count('WA')
T=S.count('TLE')
R=S.count('RE')
print('AC x '+ str(A))
print('WA x '+ str(W))
print('TLE x '+ str(T))
print('RE x '+ str(R))

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

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

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

for t in range(tc):
  r = input()
  if r == "AC":
    ac += 1
  elif r == "WA":
    wa += 1
  elif r == "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):
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(1000000)
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]

N = I()
sr = SR(N)

c = collections.Counter(sr)

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())
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
    if S[i]=="WA":
        wa_count+=1
    if S[i]=="TLE":
        tle_count+=1
    if 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())

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


import sys
sys.setrecursionlimit(300000)


def solve(N: int, S: "List[str]"):
    s = {'AC': 0, 'WA': 0, 'TLE':0, 'RE':0}
    for c in S:
        s[c] += 1
    for c in ['AC', 'WA', 'TLE', 'RE']:
        print('{} x {}'.format(c, s[c]))
    return

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

if __name__ == '__main__':
    main()

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


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

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

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

for i in range(n):
    out[s[i]] += 1
for i in ["AC","WA","TLE","RE"]:
    print(f"{i} x {out[i]}")

Solution (Python):
N = int(input())
cnt=[0,0,0,0]
for _ in range(N):
    S=input()
    if S=="AC":
      cnt[0]+=1
    elif S=="WA":
      cnt[1]+=1
    elif S=="TLE":
      cnt[2]+=1
    else:
      cnt[3]+=1

msg="AC x " + str(cnt[0]) + "\n"
msg+="WA x " + str(cnt[1]) + "\n"
msg+="TLE x " + str(cnt[2]) + "\n"
msg+="RE x " + str(cnt[3])

print(msg)

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

b = l.count("AC")
c = l.count("WA")
d = l.count("TLE")
e = l.count("RE")

print("AC x",b)
print("WA x",c)
print("TLE x",d)
print("RE x",e)

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):
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
    elif s == "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):
n=int(input())
a=0
w=0
t=0
r=0
for i in range(n):
    s=str(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):
N = int(input())
S = [input() for _ 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())
S = [input() for i in range(N)]
S_name = ['AC','WA','TLE','RE']
for i in range(len(S_name)):
    print(S_name[i] ,'x' ,S.count(S_name[i]))

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

for _ in range(N):
    user = input()
    if user == "AC":
        AC += 1
    elif user == "TLE":
        TLE += 1
    elif user == "WA":
        WA += 1
    elif user == "RE":
        RE += 1
print("AC x {} \nWA x {} \nTLE x {} \nRE x {}".format(AC, WA, TLE, RE))

Solution (Python):
n = int(input())
a = ['AC', 'WA', 'TLE', 'RE']
ans = [0]*4
for i in range(n):
    s = input()
    ans[a.index(s)] += 1
for x, y in zip(a, ans):
    print(x, ' x ', y)

Solution (Python):
import sys
n = int(input())
a = []
for l in sys.stdin:
    a.append(l.replace('\n',''))
    
def count(a,str):
  return len([i for i in a if i ==str])

print(f'AC x {count(a,"AC")}')
print(f'WA x {count(a,"WA")}')
print(f'TLE x {count(a,"TLE")}')
print(f'RE x {count(a,"RE")}')

Solution (Python):
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
    s=input()
    d=[]
    d.append(s)
    for i in range(len(d)):
        if d[i]=="AC":
            ac=ac+1
        if d[i]=="WA":
            wa=wa+1
        if d[i]=="TLE":
            tle=tle+1
        if d[i]=="RE":
            re=re+1
print("AC x ",ac)
print("WA x ",wa)
print("TLE x ",tle)
print("RE x ",re)

Solution (Python):


if __name__ == "__main__":
    num = int(input())
    
    AC = 0
    WA = 0
    TLE = 0
    RE = 0
    for i in range(num):
        case = input()
        if case == "AC":
            AC+=1
        if case == "WA":
            WA+=1
        if case == "TLE":
            TLE+=1
        if case == "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):
s = int(input())
n = []
for i in range(s):
    n.append(input())
a = n.count('AC')
b = n.count('WA')
c = n.count('TLE')
d = n.count('RE')
   
A = str(a)
B = str(b)
C = str(c)
D = str(d)
        
AC = 'AC x ' + A
WA = 'WA x ' + B
TLE = 'TLE x ' + C
RE = 'RE x ' + D

print(AC)
print(WA)
print(TLE)
print(RE)

Solution (Python):
import math
import sys

def main():

    n = int(input())
    s = [input() for i in range(n)]
    c0,c1,c2,c3 = 0,0,0,0
    
    for i in range(n):
        if "AC" in s[i]:
            c0 += 1
        if s[i] in 'WA':
            c1 += 1
        if s[i] in 'TLE':
            c2 += 1
        if s[i] in 'RE':
            c3 += 1
    print("AC x "+str(c0))
    print("WA x "+str(c1))
    print("TLE x "+str(c2))
    print("RE x "+str(c3))
if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
ct_ac = 0
ct_wa = 0
ct_tle = 0
ct_re = 0
for i in range(n):
    s = input()
    if s == 'AC':
        ct_ac += 1
    if s == 'WA':
        ct_wa += 1
    if s == 'TLE':
        ct_tle += 1
    if s == 'RE':
        ct_re += 1

print('AC x ' + str(ct_ac))
print('WA x ' + str(ct_wa))
print('TLE x ' + str(ct_tle))
print('RE x ' + str(ct_re))

Solution (Python):
N = int(input())
lists = []
AC = 0
TLE = 0
WA = 0
RE = 0
for i in range(N):
    S = str(input())
    lists.append(S)
for o in lists:
    if o == "AC":
        AC +=1
    elif o == "TLE":
        TLE +=1
    elif o == "WA":
        WA +=1
    elif o == "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())
X =[]
for i in range (n):
 X.append (input())
print ("AC x", X.count("AC"))
print ("WA x", X.count("WA"))
print ("TLE x", X.count("TLE"))
print ("RE x", X.count("RE"))

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

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

N = int(input())

S = [input().replace('\n', '') for _ in range(N)]

AC_c = 0
WA_c = 0
TLE_c = 0
RE_c = 0

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

for s in S:
    r[s] += 1

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

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


print(f'AC x {lst.count("AC")}')
print(f'WA x {lst.count("WA")}')
print(f'TLE x {lst.count("TLE")}')
print(f'RE x {lst.count("RE")}')

Solution (Python):
N = int(input())
lists = []
AC = 0
TLE = 0
WA = 0
RE = 0
for i in range(N):
    S = str(input())
    lists.append(S)
for o in lists:
    if o == "AC":
        AC +=1
    elif o == "TLE":
        TLE +=1
    elif o == "WA":
        WA +=1
    elif o == "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 i in range(n):
    s = input()
    dic[s] += 1
for key in ['AC', 'WA', 'TLE', 'RE']:
    print('{0} x {1}'.format(key, dic[key]))

Solution (Python):
def main():
    n = int(input())
    ac, wa, tle, re = 0, 0, 0, 0
    for i in range(n):
        s = input()
        if s == 'AC':
            ac += 1
        elif s == 'WA':
            wa += 1
        elif s == 'TLE':
            tle += 1
        elif s == 'RE':
            re += 1
    print(f"AC x {ac}")
    print(f"WA x {wa}")
    print(f"TLE x {tle}")
    print(f"RE x {re}")
    return 0

if __name__ == "__main__":
    main()