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):
ac = 0
wa = 0
tle = 0
re = 0

n = int(input())
for i in range(n):
  x = input()
  if x=='AC':
    ac = ac+1
  elif x=='WA':
    wa = wa+1
  elif x=='TLE':
    tle = tle+1
  else:
    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):
def resolve():
    N = int(input())
    ans = [0,0,0,0]
    for i in range(N):
        S = input()
        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 ' + str(ans[0]) )
    print( 'WA x ' + str(ans[1]) )
    print( 'TLE x ' + str(ans[2]) )
    print( 'RE x ' + str(ans[3]) )
resolve()

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


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
ls = []
for i in range(N):
  a = input()
  ls.append(a)
AC,WA,TLE,RE = ls.count("AC"), ls.count("WA"), ls.count("TLE"), ls.count("RE")
print(f"AC x {AC}\nWA x {WA}\nTLE x {TLE}\nRE x {RE}")

Solution (Python):
def main():
  n = int(input())
  c = [0,0,0,0]
  for i in range(n):
    s = input()
    if s == 'AC':
      c[0] += 1
    elif s == 'WA':
      c[1] += 1
    elif s == 'TLE':
      c[2] += 1
    else:
      c[3] += 1
  print(f'AC x {c[0]}')
  print(f'WA x {c[1]}')
  print(f'TLE x {c[2]}')
  print(f'RE x {c[3]}')
main()

Solution (Python):
from collections import Counter

N=int(input())
ans_list=[]
for n in range(N):
    ans_list.append(input())

ans_Counter=Counter(ans_list)

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

for a in ans_val:
    print(a+' x',ans_Counter[a])

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

for key, value in a_dict.items():
  print(key,"x",value)

Solution (Python):
N = int(input())
a = 0
b = 0
c = 0
d = 0

for _ in range(N):
    S = input()
    if S == "AC":
        a += 1
    if S == "WA":
        b += 1
    if S == "TLE":
        c += 1
    if 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())

ans = {}
L = []
for _ in range(N):
	L.append(input())

for l in L:
	if l in ans:
		ans[l] +=1
	else:
		ans[l] = 1
print("AC x " + str(ans["AC"])) if "AC" in ans else print("AC x 0")
print("WA x " + str(ans["WA"])) if "WA" in ans else print("WA x 0")
print("TLE x " + str(ans["TLE"])) if "TLE" in ans else print("TLE x 0")
print("RE x " + str(ans["RE"])) if "RE" in ans else print("RE x 0")

Solution (Python):
N = int(input())
S = []
for x in range(N):
    S += [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):
a = int(input())

b = [0,0,0,0]
for i in range(a):
    c = input()
    if c == "AC":
        b[0] += 1
    elif c == "WA":
        b[1] += 1
    elif c == "TLE":
        b[2] += 1
    elif c == "RE":
        b[3] += 1

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

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

Solution (Python):
n=int(input())
a=0
b=0
c=0
d=0

for _ in range(n):
  ji=input()
  if ji=="AC":
    a=a+1
  elif ji=="WA":
    b=b+1
  elif ji=="TLE":
    c=c+1
  else:
    d=d+1
    
print("AC x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))

Solution (Python):

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

n = int(input())

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


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

Solution (Python):
from typing import List
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    x = input()
    if(x=='AC'):
        AC += 1
    elif(x=='WA'):
        WA += 1
    elif(x=='TLE'):
        TLE += 1
    else:
        RE += 1

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

Solution (Python):
n=int(input())
S=[0,0,0,0]
for i in range(n):
    s=input()
    if s=='AC':
        S[0]+=1
    if s=='WA':
        S[1]+=1
    if s=='TLE':
        S[2]+=1
    if s=='RE':
        S[3]+=1

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

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

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

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

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

for i in s:
    r_dict[i] += 1

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

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

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


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

for i, j in C.items():
  print(i,"x", j)

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

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

Solution (Python):
N=int(input())
data=[input() for i in range(N)]
ac=0
wa=0
tle=0
re=0
for i in range(N):
    if data[i]=="AC":
        ac+=1
    elif data[i]=="WA":
        wa+=1
    elif data[i]=="TLE":
        tle+=1
    else:
        re+=1
print("AC x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))

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

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

for _ in range(N):
    s = input()
    if s == "AC":
        ac += 1
    elif s == "WA":
        wa += 1
    elif s == "TLE":
        tle += 1
    else:
        re += 1

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

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

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

a = b = c = 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
    elif S[i] == '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())
S = []
for n in range(N):
    S_n = input()
    S.append(S_n)


judge = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for s in S:
    judge[s] += 1


for k, v in judge.items():
    print(k, "x", v)

Solution (Python):
N = int(input())
arr = [input() for _ in range(N)]
ans_list =[0]*4

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

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

Solution (Python):













from sys import stdin
from operator import itemgetter
from collections import deque, Counter
import math
import pprint
from functools import reduce
import numpy as np
import random
import bisect



MOD = 1000000007
INF = float('inf')
alpha = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]

def keta(kazu): 
    kazu_str = str(kazu)
    kazu_list = [int(kazu_str[i]) for i in range(0, len(kazu_str))]
    return kazu_list

def gcd(*numbers): 
    return reduce(math.gcd, numbers)

def combination(m,n): 
    
    if n > m:
        return 'すまん'
    return math.factorial(m) // (math.factorial(m-n) * math.factorial(n))

def pow_k(x,n):  
    if n == 0:
        return 1
    K = 1
    while n > 1:
        if n % 2 != 0:
            K *= x
        x *= x
        n //= 2
    return K * x

def fact(n): 
    arr = {}
    temp = n
    for i in range(2,int(n**0.5)+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr[i] = cnt
    if temp != 1:
        arr[temp] = 1
    if arr == {}:
        arr[n] = 1
    return arr


    
def main():
    n = int(stdin.readline().rstrip())
    kekka = {"AC":0, "WA":0, "TLE":0, "RE":0}
    
    for _ in range(n):
        s = stdin.readline().rstrip()
        kekka[s] += 1
    
    for i,j in kekka.items():
        print(i,"x",j)
        
main()

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

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

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

Solution (Python):
from collections import Counter

N = int(input())


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

C = Counter(S)

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

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

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

li = []

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

a =  Counter(li)


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

Solution (Python):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for n 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())

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

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

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

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

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

for result, count in result_map.items():
    print('{} x {}'.format(result, count))

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

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

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



if __name__ == "__main__":
    main()

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

result = [0]*4

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

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

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

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

for _ in range(N):
    d[input().strip()] += 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 = list(input() for _ in range(N))

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

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

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

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

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

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

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

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

for s, v in book.items():
    print(f"{s} x {v}")

Solution (Python):
def main():
	ac_ans = 0
	wa_ans = 0
	tle_ans = 0
	re_ans = 0
	n = int(input())
	for i in range(n):
		t = str(input())
		if t == "AC":
			ac_ans += 1
		elif t == "WA":
			wa_ans += 1
		elif t == "TLE":
			tle_ans += 1
		elif t == "RE":
			re_ans += 1

	print("AC x",ac_ans)
	print("WA x",wa_ans)
	print("TLE x",tle_ans)
	print("RE x",re_ans)

if __name__ == '__main__':
	main()

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

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 i, j in dic.items():
  print(i, 'x', j)

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

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

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

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


if 'unittest' not in globals():
    resolve()

Solution (Python):
n=int(input())
a=0
w=0
t=0
r=0
for _ in range(n):
  b=input()
  if b=="AC":
    a+=1
  elif b=="WA":
    w+=1
  elif b=="TLE":
    t+=1
  else:
    r+=1
print("AC x %d"%a)
print("WA x %d"%w)
print("TLE x %d"%t)
print("RE x %d"%r)

Solution (Python):
from collections import Counter

N = int(input())
S = [input() for _ in range(N)]
s_counter = Counter(S)
print('AC x {}'.format(s_counter['AC']))
print('WA x {}'.format(s_counter['WA']))
print('TLE x {}'.format(s_counter['TLE']))
print('RE x {}'.format(s_counter['RE']))

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

results = ['AC', 'WA', 'TLE', 'RE']
for result in results:
    C.append(S.count(result))
print(f"AC x ",C[0],
"\nWA x ",C[1],
"\nTLE x ",C[2],
"\nRE x ",C[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=="TLE":
        tle+=1
    elif s=="RE":
        re+=1

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

Solution (Python):
n = int(input())
c1 = 0
c2 = 0
c3 = 0
c4 = 0
for i in range(n):
  s = str(input()) 
  if s == "AC":
    c1 += 1
  if s== "WA":
    c2 += 1
  if s == "TLE":
    c3 += 1
  if s == "RE":
    c4 += 1

print("AC x " + str(c1))
print("WA x " + str(c2))
print("TLE x " + str(c3))
print("RE x " + str(c4))

Solution (Python):
import collections

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

counter=collections.Counter(S)

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

Solution (Python):
def main():
    n  = int(input())
    ans = {'AC':0 , 'WA':0, 'TLE':0, 'RE':0}
    for i in range(n):
        s = input()
        ans[s] += 1
    for key, v in ans.items():
        print(key + ' x ' + str(v))

    
if __name__ == '__main__':
    main()

Solution (Python):

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


count=[0,0,0,0]

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

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

Solution (Python):
N = int(input())
S = []
for i in range(N):
    S.append(input())
count_ac = 0
count_wa = 0
count_re = 0
count_tle = 0
    
for j in range(N):
    if S[j] == "AC":
        count_ac += 1
    elif S[j] == "WA":
        count_wa += 1
    elif S[j] == "TLE":
        count_tle += 1
    elif S[j] == "RE":
        count_re += 1
print("AC x {0}".format(count_ac))
print("WA x {0}".format(count_wa))
print("TLE x {0}".format(count_tle))
print("RE x {0}".format(count_re))

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

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

Solution (Python):
import math
import sys

ac,wa,tle,re=0,0,0,0
for _ in range(int(input())):
  verd = input()
  if verd == 'AC':
    ac += 1
  elif verd == 'WA':
    wa += 1
  elif verd == 'RE':
    re += 1
  elif verd == 'TLE':
    tle += 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
n = int(input())
S = [input() for _ in range(n)]
C = Counter(S)

print("AC x %d"%(C["AC"]))
print("WA x %d"%(C["WA"]))
print("TLE x %d"%(C["TLE"]))
print("RE x %d"%(C["RE"]))

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

ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
  st = str(input())
  if(st == 'AC'):
    ac += 1
  elif(st == 'WA'):
    wa += 1
  elif(st == '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 collections


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

    group = collections.Counter(S)

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


resolve()

Solution (Python):
import sys
import math
import numpy as np
import functools
import operator
import collections
import itertools
N=int(input())
S = []
for _ in range(N):
    S.append(input())
print("AC" ,"x", S.count("AC"))
print("WA" ,"x", S.count("WA"))
print("TLE" ,"x", S.count("TLE"))
print("RE" ,"x", S.count("RE"))

Solution (Python):
import sys
import math


from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007

n=ii1()
a=0
t=0
w=0
r=0
for i in range(n):
    s=is1()
    if s[0]=='A':
        a+=1
    if s[0]=='T':
        t+=1
    if s[0]=='W':
        w+=1
    if s[0]=='R':
        r+=1
if a>=0:
    print('AC x',a)
if w>=0:
    print('WA x',w)
if t>=0:
    print('TLE x',t)
if r>=0:
    print('RE x',r)

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

Solution (Python):
N = int(input())
d = dict()
keys = ['AC', "WA", "TLE", "RE"]
for _ in range(N):
  s = input()
  if s in d:
    d[s] += 1
  else:
    d[s] = 1

for key in keys:
  if key in d:
    c = d[key]
  else:
    c = 0
  query = key + ' x ' + str(c)
  print(query)

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]

from collections import defaultdict 
from collections import Counter 


N = ii()

L = [input() for i in range(N)]


cnt = defaultdict(int)
cnt['AC'] = 0
cnt['WA'] = 0
cnt['TLE'] = 0
cnt['TLE'] = 0
for s in L:
    cnt[s] += 1

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

Solution (Python):
l = []
for i in range(int(input())):
   l.append(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in l:
    if i == "AC":
        ac+=1
    if i == "TLE":
        tle+=1
    if i == "WA":
        wa+=1
    if 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)]
ans = [0]*4
for i in s:
    if i == "AC":
        ans[0] += 1
    elif i == "WA":
        ans[1] += 1
    elif i == "TLE":
        ans[2] += 1
    elif i == "RE":
        ans[3] += 1
print("AC x "+str(ans[0]))
print("WA x "+str(ans[1]))
print("TLE x "+str(ans[2]))
print("RE x "+str(ans[3]))

Solution (Python):


def resolve():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip())
    ans = {"AC":0, "WA":0, "TLE":0, "RE":0 }

    for _ in range(n):
        s = input().rstrip()
        ans[s] += 1

    for key, val in ans.items():
        print(key + " x " + str(val))



if __name__ == "__main__":
    resolve()

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

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

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

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

Solution (Python):

case=int(input())
results=[input() for i in range(case)]

numAC=results.count('AC')
numWA=results.count('WA')
numTLE=results.count('TLE')
numRE=results.count('RE')

print('AC x ' + str(numAC))
print('WA x ' + str(numWA))
print('TLE x ' + str(numTLE))
print('RE x ' + str(numRE))

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

s_2 = ["AC","WA","TLE","RE"]
for i in range(4):
    print(s_2[i],"x",s[i])

Solution (Python):
n=int(input())
s=[0]*n

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


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

for i in range(n):
    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 "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))

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

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

Solution (Python):
from collections import Counter
N = int(input())
S = list(input() for _ in range(N))
d = Counter(S)
for key in ['AC', 'WA', 'TLE', 'RE']:
    print(key + ' x ' + str(d[key]))

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

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

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

import collections
ans = collections.Counter(S)

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().strip() for _ in range(n)]

ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    if s[i] == "AC":
        ac = ac + 1
    elif s[i] == "WA":
        wa = wa + 1
    elif s[i] == "TLE":
        tle = tle + 1
    elif s[i] == "RE":
        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 = [input() for i in range(n)]
print('AC x %d' % (s.count('AC')))
print('WA x %d' % (s.count('WA')))
print('TLE x %d' % (s.count('TLE')))
print('RE x %d' % (s.count('RE')))

Solution (Python):
N = int(input())
S = [0]*N

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

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

Solution (Python):



import sys


def input():
    return sys.stdin.readline()


def resolve():
    n = int(input().rstrip())
    s_list = []
    for i in range(n):
        s_list.append(input().rstrip())


    ac_cnt = s_list.count("AC")
    wa_cnt = s_list.count("WA")
    tle_cnt = s_list.count("TLE")
    re_cnt = s_list.count("RE")

    print("AC  x " + str(ac_cnt))
    print("WA  x " + str(wa_cnt))
    print("TLE  x " + str(tle_cnt))
    print("RE  x " + str(re_cnt))



if __name__ == "__main__":
    resolve()

Solution (Python):
from collections import Counter
N = int(input())
C = Counter([input() for _ in range(N)])
for i in ["AC","WA","TLE","RE"]:
    print("{} x {}".format(i,C[i]))

Solution (Python):
n=int(input())
d={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  a=input()
  d[a]=d[a]+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())
text = ["AC", "WA", "TLE", "RE"]
count = [0,0,0,0]
for j in range(n):
  line = input()
  for i in range(4):
    if line == text[i]:
      count[i] += 1
      
for i in range(4):
  print(str(text[i]) + " x " + str(count[i]))

Solution (Python):


n = int(input())

c_ac = 0
c_wa = 0
c_tle = 0
c_re = 0

for i in range(n):
    x = input()
    if x == 'AC':
        c_ac += 1
    elif x == 'WA':
        c_wa += 1
    elif x == 'TLE':
        c_tle += 1
    else:
        c_re += 1

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):
import sys
from io import StringIO
import unittest
import collections

def show(c, str):
    if str in c:
        print(str, 'x', c[str])
    else:
        print(str, 'x', 0)

def resolve():

    S = sys.stdin.readlines()
    S = list(map(lambda x: x.strip(), S))
    N = int(S[0])

    del S[0]

    c = collections.Counter(S)

    show(c, 'AC')
    show(c, 'WA')
    show(c, 'TLE')
    show(c, 'RE')
    
resolve()

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

Solution (Python):
N = int(input())
data = ["AC","WA","TLE","RE"]
count = [0]*4
for num in range(N):
  s = input()
  for i in range(4):
    if(data[i]== s):
      count[i] = count[i]+1

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