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

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

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())
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):
t = int(input())

a = b = c = d = 0
for i in range(t):
    case = input()

    if case == 'AC':
        a += 1
    elif case == 'WA':
        b += 1
    elif case == 'TLE':
        c += 1
    elif case == '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):
import numpy as np
N = int(input())

C = np.zeros(4)
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
  elif S == 'RE':
    C[3] += 1
print('AC x', int(C[0]))
print('WA x', int(C[1]))
print('TLE x', int(C[2]))
print('RE x', int(C[3]))

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

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

for _ in range(N):
    status = input()
    cnt[status] += 1
    
for k, v in cnt.items():
    print('{} x {}'.format(k,str(v)))

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

c1=0
c2=0
c3=0
c4=0

for i in range(n):
  st=input()
  if st=="AC":
    c1+=1
  if st=="WA":
    c2+=1
  if st=="TLE":
    c3+=1
  if st=="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):
N = int(input().rstrip())
Ss = []
for _ in range(N):
    Ss.append(input().rstrip())

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

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

for i in range(4):
    print(strings[i] + ' x ' + str(ans[i]))

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

ac_count = 0
wa_count = 0
tle_count = 0
re_count = 0

arr = []
for i in range(cases):
    x = input()
    if x == "AC":
        ac_count += 1
    elif x == "WA":
        wa_count += 1
    elif x == "TLE":
        tle_count += 1
    elif x == "RE":
        re_count += 1

print("AC x {0}".format(ac_count))
print("WA x {0}".format(wa_count))
print("TLE x {0}".format(tle_count))
print("RE x {0}".format(re_count))

Solution (Python):
from collections import Counter
from math import sqrt
import math

n = int(input())
a = []
b = ["AC" , "WA" , "TLE" , "RE"]
for i in range(n):
    a.append(input())
c = Counter(a)
for i in b:
    print(i , " x ",  c[i])

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

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

  for _ in range(N):
    S = input()

    if S in dic:
      dic[S] += 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"]))

if __name__ == "__main__":
  main()

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

Solution (Python):
N=int(input())
cnt=[0,0,0,0]

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

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

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

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

Solution (Python):
N = int(input())
a = ["null"]*N
for i in range(N):
  a[i] = input()
  
ac = 0
wa = 0
tle = 0
re = 0

for i in range(N):
  if a[i] == 'AC':
    ac += 1
  elif a[i] == 'WA':
    wa += 1
  elif a[i] == 'TLE':
    tle += 1
  else:
    re += 1

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

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

Solution (Python):
def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

from collections import  Counter
N = INT()
S = [input() for _ in range(N)]

S = Counter(S)
print(f"AC x {S['AC']}")
print(f"WA x {S['WA']}")
print(f"TLE x {S['TLE']}")
print(f"RE x {S['RE']}")

Solution (Python):
n=int(input())
ans=[0]*4
for i in range(n):
  x=input()
  if x=='AC':
    ans[0]+=1
  elif x=='WA':
    ans[1]+=1
  elif x=='TLE':
    ans[2]+=1
  elif x=='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):
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())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(N):
    S = input()
    if S == "AC":
        c0 += 1
    elif S == "WA":
        c1 += 1
    elif S == "TLE":
        c2 += 1
    elif S =="RE":
        c3 += 1
print("AC x " +str(c0))
print("WA x " +str(c1))
print("TLE x "+str(c2))
print("RE x "+str(c3))

Solution (Python):


N = int(input())

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):
def solve() :
    n = int(input())
    s = []

    for _ in range(n) :
        s.append(input())

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

if __name__ == "__main__":
    solve()

Solution (Python):

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

key_list = ["AC", "WA", "TLE", "RE"]
for key in key_list:
    print(key + " x " + str(S_list.count(key)))

Solution (Python):

N = int(input())

ans1 = 0
ans2 = 0
ans3 = 0
ans4 = 0
for i in range(N):
    S = input()
    if S=="AC":
        ans1 += 1
    elif S =="WA":
        ans2 += 1
    elif S == "TLE":
        ans3 += 1
    elif S == "RE":
        ans4 += 1
print("AC x " + str(ans1))
print("WA x " + str(ans2))
print("TLE x " + str(ans3))
print("RE x " + str(ans4))

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

for i in range(n) :
    s = input().rstrip('\n')
    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
wa = 0
tle = 0
re = 0

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

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

s=[0]*4
for i in range(n):
  tmp = (input())
  if tmp == 'AC':
    s[0] += 1
  elif tmp == 'WA':
    s[1] += 1
  elif tmp == 'TLE':
    s[2] += 1
  else:
    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):
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,*a=open(0).read().split()
d={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in a:
  d[i]=d.get(i,0)+1
for i,j in d.items():
     print(i,"x",j)

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

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

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

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 = list()
cnt_AC = 0
cnt_WA = 0
cnt_TLE = 0
cnt_RE = 0
for i in range(N):
  S.append(input())
for i in range(N):
  result = S[i]
  if result == "AC":
    cnt_AC += 1
  elif result == 'WA':
    cnt_WA += 1
  elif result == 'TLE':
    cnt_TLE += 1
  elif result == 'RE':
    cnt_RE += 1
print('AC x',cnt_AC)
print('WA x',cnt_WA)
print('TLE x',cnt_TLE)
print('RE x',cnt_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 "+str(a))
print("WA x "+str(b))
print("TLE x "+str(c))
print("RE x "+str(d))

Solution (Python):
n=int(input())
count1=0
count2=0
count3=0
count4=0
for i in range(n):
    s=input()
    if s=='AC':
        count1+=1
    elif s=='WA':
        count2+=1
    elif s=='TLE':
        count3+=1
    else:
        count4+=1
print('AC x '+str(count1))
print('WA x '+str(count2))
print('TLE x '+str(count3))
print('RE x '+str(count4))

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

dic = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(n):
    a = input()
    dic[a] += 1
    
for i in dic:
    print(i+' x '+str(dic[i]))

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

Solution (Python):
import sys

def I(): 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 main():
    n = I()
    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))

if __name__ == '__main__':
    main()

Solution (Python):
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    n = int(input())
    from collections import Counter as cc
    S = []
    for i in range(n):
        S.append(input())
    S = cc(S)
    print('AC x {}'.format(S['AC']))
    print('WA x {}'.format(S['WA']))
    print('TLE x {}'.format(S['TLE']))
    print('RE x {}'.format(S['RE']))


if __name__ == '__main__':
    main()

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

C = [0] * 4
for s in S:
    if s == "AC":
        C[0] += 1
    elif s == "WA":
        C[1] += 1
    elif s == "TLE":
        C[2] += 1
    elif s == "RE":
        C[3] += 1

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

Solution (Python):
import copy


def get_int():
    return int(input())


def get_string():
    return input()


def get_int_list():
    return [int(x) for x in input().split()]


def get_string_list():
    return input().split()


def get_int_multi():  
    return map(int, input().split())


def get_string_char_list():
    return list(str(input()))





'''
while (idx < n) and ():

    idx += 1
'''

def main():

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


    n = get_int()
    for num in range(n):
        work = get_string()
        if work == "AC":
            ac += 1
        elif work == "WA":
            wa += 1
        elif work == "TLE":
            tle += 1
        elif work == "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):
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
from math import floor, sqrt, factorial, hypot, log  
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict, deque
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint


def ceil(a, b): return (a + b - 1) // b


inf = float('inf')
mod = 10 ** 9 + 7


def pprint(*A):
    for a in A:     print(*a, sep='\n')


def INT_(n): return int(n) - 1


def MI(): return map(int, input().split())


def MF(): return map(float, input().split())


def MI_(): return map(INT_, input().split())


def LI(): return list(MI())


def LI_(): return [int(x) - 1 for x in input().split()]


def LF(): return list(MF())


def LIN(n: int): return [I() for _ in range(n)]


def LLIN(n: int): return [LI() for _ in range(n)]


def LLIN_(n: int): return [LI_() for _ in range(n)]


def LLI(): return [list(map(int, l.split())) for l in input()]


def I(): return int(input())


def F(): return float(input())


def ST(): return input().replace('\n', '')

from collections import Counter


def main():
    N = I()
    a = []
    for i in range(N):
        j = ST()
        a.append(j)
    cnt = Counter(a)
    print('AC x ' + str(cnt['AC']))
    print('WA x ' + str(cnt['WA']))
    print('TLE x ' + str(cnt['TLE']))
    print('RE x ' + str(cnt['RE']))
    

if __name__ == '__main__':
    main()

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

Solution (Python):
result_list = ["AC","WA","TLE","RE"]
dic = dict([[result,0] for result in result_list])
n = int(input())
for _ in range(n):
    dic[input()]+=1
for result in result_list:
    print(result + " x " + str(dic[result]))

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

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

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

for i in range(N):
    S = input()
    if S=="AC":
        C0 +=1
    elif S=="WA":
        C1 +=1
    elif S=="TLE":
        C2 +=1
    else:
        C3+=1

print("AC x "+ str(C0))
print("WA x "+ str(C1))
print("TLE x "+ str(C2))
print("RE x "+ str(C3))

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

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
    else:
        pass

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

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

Solution (Python):
N = int(input())
S = ['' for i in range(N)]
for i in range(N):
    S[i] = 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):
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
  else:
    d += 1
print('AC' + ' ' + 'x' + ' ' + str(a))
print('WA' + ' ' + 'x' + ' ' + str(b))
print('TLE' + ' ' + 'x' + ' ' + str(c))
print('RE' + ' ' + 'x' + ' ' + str(d))

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

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

for i in range(n):
    s=input()
    if s == "AC":
        li[0]+=1
    if s == "WA":
        li[1]+=1
    if s == "TLE":
        li[2]+=1
    if s == "RE":
        li[3]+=1

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

Solution (Python):
N = int(input())
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0 


for i in range(N):
    tmp = str(input())
    if tmp == "AC":
        count_AC += 1
    elif tmp == "WA":
        count_WA += 1
    elif tmp == "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())

C=[0]*4

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

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

Solution (Python):
def main():
    N = int(input())
    S = [input() for _ in range(N)]
    c_AC = len([x for x in S if x == "AC"])
    c_WA = len([x for x in S if x == "WA"])
    c_TLE = len([x for x in S if x == "TLE"])
    c_RE = len([x for x in S if x == "RE"])
    print("AC x", c_AC)
    print("WA x", c_WA)
    print("TLE x", c_TLE)
    print("RE x", c_RE)


if __name__ == '__main__':
    main()

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

ans = [0]*4
for n in range(N):
  C = input()
  if C == "AC":
    ans[0] += 1
  elif C == "WA":
    ans[1] += 1
  elif C == "TLE":
    ans[2] += 1
  elif C == "RE":
    ans[3] += 1

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

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

Solution (Python):
import collections

N = int(input())
judge = collections.Counter([input() for _ in range(N)])
print("AC x " + str(judge["AC"]))
print("WA x " + str(judge["WA"]))
print("TLE x " + str(judge["TLE"]))
print("RE x " + str(judge["RE"]))

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

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

for i in d.keys():
    print(i + ' x ' + str(d[i]))

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

it = ["AC","WA","TLE","RE"]
for s in it:
	print("%s  x  %s" % (s,ans[s]))

Solution (Python):
n=int(input())
s=[input() for _ 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())
numl = [0] * 4
for i in range(n):
    s = input()
    if(s == "AC"):
        numl[0]+=1
    elif(s ==  "WA"):
        numl[1]+=1
    elif(s == "TLE"):
        numl[2]+=1
    else:
        numl[3]+=1
print("AC x "+str(numl[0]))
print("WA x "+str(numl[1]))
print("TLE x "+str(numl[2]))
print("RE x "+str(numl[3]))

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

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

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

for n in range(N):
    S=input()
    if S=="AC":
        C0+=1
    elif S=="WA":
        C1+=1
    elif S=="TLE":
        C2+=1
    else:
        C3+=1   

print("AC x "+str(C0))
print("WA x "+str(C1))
print("TLE x "+str(C2))
print("RE x "+str(C3))

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

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

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

"""
@author: H_Hoshigi
"""
def main():
    N = int(input())
    S_lsit = [input() for i in range(N)]

    counter_list = [0, 0, 0, 0]
    for S in S_lsit:
        if S == "AC":
            counter_list[0] += 1
        elif S == "WA":
            counter_list[1] += 1
        elif S == "TLE":
            counter_list[2] += 1
        elif S == "RE":
            counter_list[3] += 1
    print("AC x {}".format(counter_list[0]))
    print("WA x {}".format(counter_list[1]))
    print("TLE x {}".format(counter_list[2]))
    print("RE x {}".format(counter_list[3]))

if __name__ == "__main__":
    main()

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

def main():
    n = int(input())
    ans = {'AC':0, 'WA':0, 'TLE':0, 'RE':0,}
    for i 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']))
if __name__ == '__main__':
    main()

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

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

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

for _ in range(N):
    d[input()] += 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())
s = [0, 0, 0, 0]

for i in range(n):
  tmp = input()
  if tmp == "AC":
    s[0] += 1
  elif tmp == "WA":
    s[1] += 1
  elif tmp == "TLE":
    s[2] += 1
  elif tmp == "RE":
    s[3] += 1

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

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

ans = [0]*4
for i in range(n):
    if s[i] == 'AC':
        ans[0] += 1
    elif s[i] == 'WA':
        ans[1] += 1
    elif s[i] == 'TLE':
        ans[2] += 1
    elif s[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 main():
    N = int(input())
    cases = dict()
    for _ in range(N):
        s = input()
        cases[s] = cases.get(s, 0) + 1
    
    results = ["AC", "WA", "TLE", "RE"]

    for r in results:
        print(f"{r} x {cases.get(r, 0)}")
    

if __name__ == '__main__':
    main()

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

ans = [0]*4

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

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

Solution (Python):
n = int(input())
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 collections
n=int(input())
data=[]
for i in range(n):
    num=input()
    data.append(num)
data=collections.Counter(data)
print("AC x {}".format(data["AC"]))
print("WA x {}".format(data["WA"]))
print("TLE x {}".format(data["TLE"]))
print("RE x {}".format(data["RE"]))

Solution (Python):
from sys import stdin

def main():

    input = stdin.readline

    N = int(input())

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


    for _ in range(N):
        s = str(input())[:-1]
        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())

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

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

Solution (Python):
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction

sys.setrecursionlimit(int(pow(10,6)))


mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]



t=1

for _ in range(t):
    n=L()[0]
    a,b,c,d=0,0,0,0
    for i in range(n):
        x=input()
        if x=="AC":
            a+=1
        elif x=="WA":
            b+=1
        elif x=="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())

d = {'AC':0, 'TLE':0, 'WA':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):
import sys
from collections import defaultdict
from typing import Callable


def main():
    readline: Callable[[], str] = sys.stdin.readline

    memory: defaultdict = defaultdict(int)

    n: int = int(readline().rstrip())
    for _ in range(n):
        s: str = readline().rstrip()
        memory[s] += 1

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

if __name__ == '__main__':
    main()

Solution (Python):
from collections import Counter
t=int(input())
lst=[]
for _ in range(t):
	lst.append(input())
lst=Counter(lst)
if 'AC' in lst.keys():
	print("AC x",lst['AC'])
else:
	print("AC x 0")
if 'WA' in lst.keys():
	print("WA x",lst['WA'])
else:
	print("WA x 0")
if 'TLE' in lst.keys():
	print("TLE x",lst['TLE'])
else:
	print("TLE x 0")
if 'RE' in lst.keys():
	print("RE x",lst['RE'])
else:
	print("RE x 0")

Solution (Python):
S = [0]*4
N = int(input())
for i in range(N):
  a = input()
  if(a=="AC"):
    S[0] +=1
  elif (a=="WA"):
    S[1] +=1
  elif(a=="TLE"):
    S[2] +=1
  else:
    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):
N = int(input())
counter = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0
}
for i in range(N):
    counter[input()] += 1

for judge in ['AC', 'WA', 'TLE', 'RE']:
    print(judge + ' x ' + str(counter[judge]))

Solution (Python):
N = int(input())
C0 = C1 = C2 = C3 = 0
for i in range(N):
    test = input()
    if test == 'AC':
        C0 += 1
    elif test == 'WA':
        C1 += 1
    elif test == 'TLE':
        C2 += 1
    else:
        C3 += 1
print('AC x ' + str(C0))
print('WA x ' + str(C1))
print('TLE x ' + str(C2))
print('RE x ' + str(C3))

Solution (Python):
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
cnt = [0]*4
for i in range(N):
    S = readline().decode().rstrip()
    if S == 'AC':
        cnt[0] +=1
    if S == 'WA':
        cnt[1] +=1
    if S == 'TLE':
        cnt[2] +=1
    if S == 'RE':
        cnt[3] +=1
print('AC x '+str(cnt[0]))
print('WA x '+str(cnt[1]))
print('TLE x '+str(cnt[2]))
print('RE x '+str(cnt[3]))

Solution (Python):
from collections import defaultdict

def main():
    N = int(input())
    m = defaultdict(int)
    for _ in range(N):
        m[input()] += 1
    print('AC x', m['AC'])
    print('WA x', m['WA'])
    print('TLE x', m['TLE'])
    print('RE x', m['RE'])

if __name__ == '__main__':
    main()

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

Solution (Python):
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}")