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):
def getN():
    return int(input())
def getNM():
    return map(int, input().split())
def getList():
    return list(map(int, input().split()))
def getArray(intn):
    return [int(input()) for i in range(intn)]
def input():
    return sys.stdin.readline().rstrip()
def rand_N(ran1, ran2):
    return random.randint(ran1, ran2)
def rand_List(ran1, ran2, rantime):
    return [random.randint(ran1, ran2) for i in range(rantime)]
def rand_ints_nodup(ran1, ran2, rantime):
  ns = []
  while len(ns) < rantime:
    n = random.randint(ran1, ran2)
    if not n in ns:
      ns.append(n)
  return sorted(ns)

def rand_query(ran1, ran2, rantime):
  r_query = []
  while len(r_query) < rantime:
    n_q = rand_ints_nodup(ran1, ran2, 2)
    if not n_q in r_query:
      r_query.append(n_q)
  return sorted(r_query)

from collections import defaultdict, deque, Counter
from sys import exit
from decimal import *
import heapq
import math
from fractions import gcd
import random
import string
import copy
from itertools import combinations, permutations, product
from operator import mul
from functools import reduce
from bisect import bisect_left, bisect_right

import sys
sys.setrecursionlimit(1000000000)
mod = 10 ** 9 + 7






N = getN()
S = defaultdict(int)
alta = [input() for i in range(N)]
for i in alta:
    if i == "AC":
        S[i] += 1
for i in alta:
    if i == "WA":
        S[i] += 1
for i in alta:
    if i == "TLE":
        S[i] += 1
for i in alta:
    if i == "RE":
        S[i] += 1

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

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

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

for i in N:
    if i == "AC":
        AC += 1
    elif i == "WA":
        WA += 1
    elif i == "TLE":
        TLE += 1
    elif i == "RE":
        RE += 1


print('AC x ',AC,
      '\nWA x ',WA,
      '\nTLE x ',TLE,
      '\nRE x ',RE)

Solution (Python):
a = int(input())
s = []
for i in range(0,a) :
    d = input()
    s.append(d)
    

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

for i in range(0,len(s)) :
    if s[i] == "AC" :
        c1 += 1
    elif s[i] == "WA" :
        c2 += 1
    elif s[i] == "TLE" :
        c3 += 1
    elif s[i] == "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())
l=[]
for i in range(N):
  l.append(str(input()))


a=l.count("AC")
w=l.count("WA")
t=l.count("TLE")
r=l.count("RE")

print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(a,w,t,r))

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

for i in range(n):
  r = str(input())
  if r == "AC":
    AC += 1
  elif r == "WA":
    WA += 1
  elif r == "TLE":
    TLE += 1
  elif r == "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):
import sys
import  math
import fractions
from collections import defaultdict
stdin = sys.stdin
     
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))

N=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(N):
    S=ns()
    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):
ac = 0
wa = 0
tle =0
re = 0
n = int(input())
for i 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))

Solution (Python):
n=int(input())
counta=0
countb=0
countc=0
countd=0
for _ in range(n):
    s=input()
    if "AC" in s:
        counta+=1
    elif "WA" in s:
        countb+=1
    elif "TLE" in s:
        countc+=1
    elif "RE" in s:
        countd+=1
print("AC","x",counta)
print("WA","x",countb)
print("TLE","x",countc)
print("RE","x",countd)

Solution (Python):
n = int(input())
k = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0

for j in range(n):
  if k[j] == 'AC':
    ac += 1
  elif k[j] == 'WA':
    wa += 1
  elif k[j] == 'TLE':
    tle += 1
  elif k[j] == 'RE':
    re += 1
    
print("AC x",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)

Solution (Python):
a=0
b=0
c=0
d=0
i = 0
N = int(input()) 
s = [input() for i in range(N)] 
print(f"AC x {s.count('AC')}")
print(f"WA x {s.count('WA')}")
print(f"TLE x {s.count('TLE')}")
print(f"RE x {s.count('RE')}")

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

ac = wa = tle = re = 0

for si in s:
  if si == 'AC':
    ac += 1
  elif si == 'WA':
    wa += 1
  elif si == 'TLE':
    tle += 1
  elif si == '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())
ac = wa = tle = re = 0
for i in range(n):
  m = input()
  if m == 'AC': ac += 1
  elif m == 'WA': wa += 1
  elif m == '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())
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 {}".format(ans[0]))
print("WA x {}".format(ans[1]))
print("TLE x {}".format(ans[2]))
print("RE x {}".format(ans[3]))

Solution (Python):

from collections import defaultdict,deque, Counter
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")


def solve():
    n = II()
    s = SR(n)
    c = Counter(s)
    print("AC x", c["AC"])
    print("WA x", c["WA"])
    print("TLE x", c["TLE"])
    print("RE x", c["RE"])
    return



if __name__ == '__main__':
    solve()

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
        elif s == 'RE':
            c[3] += 1
    print("AC x {}".format(c[0]))
    print("WA x {}".format(c[1]))
    print("TLE x {}".format(c[2]))
    print("RE x {}".format(c[3]))

if __name__=='__main__':
    main()

Solution (Python):
def sol():
    n=int(input())
    AC=WA=TLE=RE=0
    for i in range(n):
        p=input()
        if(p=="AC"):
            AC+=1
        elif(p=="WA"):
            WA+=1
        elif(p=="TLE"):
            TLE+=1
        elif(p=="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__'):
    sol()

Solution (Python):
N = int(input())
l = [input() for _ in range(N)]
AC = 0
WA = 0
TLE = 0
RE = 0

for e in l:
    if e == "AC":
        AC += 1
    elif e == "WA":
        WA += 1
    elif e == "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())
a = [input() for i in range(N)]
ac = a.count('AC')
wa = a.count('WA')
tle = a.count('TLE')
re = a.count('RE')


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

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

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

for judge, count in judge_count.items():
    print(f'{judge} x {count}')

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

cnt = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for si in S:
  cnt[si] += 1
  
for key, val in cnt.items():
  print('{} x {}'.format(key, val))

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
    elif a == "WA":
        WA += 1
    elif a == "TLE":
        TLE += 1
    elif a == "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):
i = int(input())
v=[]
ac =0
wa =0
tle=0
re =0
for _ in range(0, i):
    v.append(input())


for value in v:
    if value == 'AC':
        ac += 1
    elif value == 'WA':
        wa += 1
    elif value == 'TLE':
        tle += 1
    elif value == '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):
C=["AC","WA","TLE","RE"]
N, = map(int, input().split())
from collections import defaultdict
D = defaultdict(int)
for _ in range(N):
    s = input().strip()
    D[s] += 1
for c in C:
    print(c+" x "+str(D[c]))

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

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

for a in ans:
    print(a, 'x', d[a])

Solution (Python):
N = int(input())
S = ['AC', 'WA', 'TLE', 'RE']
a = 0
b = 0
c = 0
d = 0
for i in range(N):
    user = input()
    if user == 'AC':
        a += 1
    elif user == 'WA':
        b += 1
    elif user == 'TLE':
        c += 1
    elif user == 'RE':
        d += 1
print(f"AC x {a}\nWA x {b}\nTLE x {c}\nRE x {d}")

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

ac = judge_list.count('AC')
wa = judge_list.count('WA')
tle = judge_list.count('TLE')
re = judge_list.count('RE')

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

Solution (Python):
ac = 0
wa = 0
tle = 0
re = 0
t  = int(input())
while t:
    k = input()
    if k == "AC":
        ac += 1
    elif k == "WA":
        wa += 1
    elif k == "TLE":
        tle += 1
    elif k == "RE":
        re +=1
    t = t-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", 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
n = int(input())

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

for i in sys.stdin.readlines():
    result[i.rstrip()] += 1

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

Solution (Python):
N = int(raw_input())
A = [raw_input() for _ in xrange(N)]

for c in ['AC', 'WA', 'TLE', 'RE']:
  ct = A.count(c)
  print "{} x {}".format(c, ct)

Solution (Python):
def main():
    n = int(input())
    s = [input() for _ in range(n)]
    ans = ""
    ans += "AC x " + str(s.count("AC")) + "\n"
    ans += "WA x " + str(s.count("WA")) + "\n"
    ans += "TLE x " + str(s.count("TLE")) + "\n"
    ans += "RE x " + str(s.count("RE")) + "\n"
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
C = [ 0 for i in range(4) ]
s2num = {"AC":0, "WA":1, "TLE":2, "RE":3}
num2s = {0:"AC", 1:"WA", 2:"TLE", 3:"RE"}

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

for i in range(4):
    print("{} x {}".format( num2s[i], C[i] ))

Solution (Python):
l=[]
n=int(input())
for i in range(n):
  l.append(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):
N=int(input())
Ss = [input() for i in range(1,N+1)]
Cs=[]
Results=["AC","WA","TLE","RE"]
for st in Results:
    Cs.append(Ss.count(st))
for i in range(0,4):
    print(str(Results[i])+ " x " +str(Cs[i]))

Solution (Python):
n=int(input())
li=[input() for i in range(n)]
ac=li.count("AC")
wa=li.count("WA")
tle=li.count("TLE")
re=li.count("RE")
print("AC x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))

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

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

for i in range(N):
    a=input()
    if a=="AC":
        ac+=1
    elif a=="WA":
        wa+=1
    elif a=="TLE":
        tle+=1
    elif 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):
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)]
a1 = str(S.count("AC"))
a2 = str(S.count("WA"))
a3 = str(S.count("TLE"))
a4 = str(S.count("RE"))
print("AC x " + a1)
print("WA x " + a2)
print("TLE x " + a3)
print("RE x " + a4)

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

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

for i in range(N):
        if  cnt[i] == 'AC':
                ac+=1
        elif cnt[i] == 'WA':
                wa+=1
        elif cnt[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):
import sys
sys.setrecursionlimit(10**6)


def main(input, print):
    n = int(input())
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for i in range(n):
        s = input().strip()
        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))


if __name__ == '__main__':
    main(sys.stdin.readline, print)

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

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

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

Solution (Python):

i = 0
AC = 0
WA = 0
TLE = 0
RE = 0
num = int(input())

while i <num:
  line = input()
  
  if line == "AC":
    AC += 1
  if line == "WA":
    WA += 1
  if line == "TLE":
    TLE += 1
  if line == "RE":
    RE += 1
  i += 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())
C = [0]*4

for n in range(N):
    data = input()
    if "AC" == data:
        C[0] += 1
    elif "WA" == data:
        C[1] += 1
    elif "TLE" == data:
        C[2] += 1
    elif "RE" == data:
        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):
n = int(input())
l = []
for i in range(n):
    l.append(input())
count = [0, 0, 0, 0]
for i in range(len(l)):
    if l[i] == 'AC':
        count[0] += 1
    elif l[i] == 'WA':
        count[1] += 1
    elif l[i] == 'TLE':
        count[2] += 1
    else:
        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_s = [input() for _ in range(N)]
AC = len(list(filter(lambda x:x=='AC', S_s)))
WA = len(list(filter(lambda x:x=='WA', S_s)))
TLE = len(list(filter(lambda x:x=='TLE', S_s)))
RE = len(list(filter(lambda x:x=='RE', S_s)))
print('AC x',AC)
print('WA x',WA)
print('TLE x',TLE)
print('RE x',RE)

Solution (Python):
N = int(input())
C0 = "AC"
C1 = "WA"
C2 = "TLE"
C3 = "RE"
list = []
for i in range(N):
    string = input()
    list.append(string)
print(f"{C0} x {list.count(C0)}")
print(f"{C1} x {list.count(C1)}")
print(f"{C2} x {list.count(C2)}")
print(f"{C3} x {list.count(C3)}")

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


def log(*args):
    print(*args, file=sys.stderr)


def main():
    n = int(input())
    s = []
    for _ in range(n):
        s.append(input().rstrip())
    c = Counter(s)
    for s in ["AC", "WA", "TLE", "RE"]:
        print("{} x {}".format(s, c[s]))
   


if __name__ == '__main__':
    main()

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

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

for _ in range(n):
    S = input()
    verdict[S.upper()] += 1
for i, j in verdict.items():
    print(f'{i} x {j}')

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

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

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):
N = int(input())
S = [input() for i in range(N)]
AC, WA, TLE, RE = 0, 0, 0, 0
AC = S.count("AC")
WA = S.count("WA")
TLE = S.count("TLE")
RE = S.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())
S = [input() for _ in range(N)]

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

Solution (Python):
n = int(input())
l = []
for i in range(n):
  l.append(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):
n = int(input())  
str_list = [input() for _ in range(n)]
AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(n):
  if str_list[i] == 'AC':
    AC +=1
  elif str_list[i] == 'WA':
    WA += 1
  elif str_list[i] == 'TLE':
    TLE += 1
  elif str_list[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())
inp=[]

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

c0=inp.count("AC")
c1=inp.count("WA")
c2=inp.count("TLE")
c3=inp.count("RE")

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

Solution (Python):
N = int(input()) 
s = [input() for i in range(N)] 
def count_ac (s):
    n = 0
    for i in range (0, N):
        if s[i] == "AC":
            n = n + 1
        else:
            n = n
    return n
def count_wa (s):
    n = 0
    for i in range (0, N):
        if s[i] == "WA":
            n = n + 1
        else:
            n = n
    return n
def count_tle (s):
    n = 0
    for i in range (0, N):
        if s[i] == "TLE":
            n = n + 1
        else:
            n = n
    return n
def count_re (s):
    n = 0
    for i in range (0, N):
        if s[i] == "RE":
            n = n + 1
        else:
            n = n
    return n
C0 = count_ac (s)
C1 = count_wa (s)
C2 = count_tle (s)
C3 = count_re (s)
t = [0, 0, 0, 0]
t[0] = "AC x " + str(C0)
t[1] = "WA x " + str(C1)
t[2] = "TLE x " + str(C2)
t[3] = "RE x " + str(C3)
for i in t:
    print(i)

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

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

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

Solution (Python):
import numpy as np

n = int(input())

sum = np.zeros(4, dtype=np.int)

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

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

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

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

for input in S:
    if input == 'AC':
        AC += 1
    elif input == 'WA':
        WA += 1
    elif input == 'TLE':
        TLE += 1
    else:
        RE += 1

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

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

AC = S.count('AC')
WA = S.count('WA')
TLE = S.count('TLE')
RE = S.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())
a = [input() for i in range(n)]

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

Solution (Python):
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']))

Solution (Python):
N = int(input())
Cac = 0
Cwa = 0
Ctle = 0
Cre = 0
for cnt in range(N):
    Si = input()
    if Si == 'AC':
        Cac = Cac + 1
    elif Si == 'WA':
        Cwa = Cwa + 1
    elif Si == 'TLE':
        Ctle = Ctle + 1
    elif Si == 'RE':
        Cre = Cre + 1

print('AC', 'x', Cac)
print('WA', 'x', Cwa)
print('TLE', 'x', Ctle)
print('RE', 'x', Cre)

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

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

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

Solution (Python):
"""
https://atcoder.jp/contests/abc173/tasks/abc173_b
"""

import numpy as np





def calc(S: np.ndarray, keys):
    return {key: np.sum(S == key) for key in keys}


def main() -> None:
    keys = ["AC", "WA", "TLE", "RE"]
    N = int(input())
    S = []
    for i in range(N):
        S.append(input())
    result = calc(np.array(S), keys)
    for key in keys:
        print(f"{key} x {result[key]}")


main()

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

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

print(f'AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}\n')

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

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

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

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

Solution (Python):
x=int(input())
lst = []
for i in range (0,x):
    ele=input()

    lst.append(ele)

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

for j in range (0,x):
    if(lst[j]=='AC'):
        a=a+1
    elif(lst[j]=='WA'):
          b=b+1

    elif (lst[j] == 'TLE'):
             c=c+1

    elif (lst[j] == 'RE'):
                d=d+1

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

Solution (Python):
C0=0
C1=0
C2=0
C3=0
N=int(input())
S=list(range(N))
for i in range(N):
  S[i] = input()
for i in range(N):
  if S[i]=="AC":
    C0 += 1
  elif S[i]=="WA":
    C1 += 1
  elif S[i]=="TLE":
    C2 += 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())
s = [input() for i in range(n)]

nac = 0
nwa = 0
ntle = 0
nre = 0

for i in s:
    if i == 'AC':
        nac += 1
    if i == 'WA':
        nwa += 1
    if i == 'TLE':
        ntle += 1
    if i == 'RE':
        nre += 1

print("AC x ", nac)
print("WA x ", nwa)
print("TLE x ", ntle)
print("RE x ", nre)

Solution (Python):
n = int(input())
a, w, t, r = 0, 0, 0, 0
for i in range(n):
  key = input()
  if key == "AC":
    a += 1
  if key == "WA":
    w += 1
  if key == "TLE":
    t += 1
  if key == "RE":
    r += 1

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

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

b=0
c=0
d=0
e=0

for i in range(a):
  name=input()

  if name=='AC':
    b+=1
  elif name=='WA':
    c+=1
  elif name=='TLE':
    d+=1
  elif name=='RE':
    e+=1

print('AC'+' x '+str(b))
print('WA'+' x '+str(c))
print('TLE'+' x '+str(d))
print('RE '+' x '+str(e))

Solution (Python):
N=int(input())
S=[]
for i in range(0, N):
    val = input()
    S.append(val)
ac=S.count('AC')
wa=S.count('WA')
tle=S.count('TLE')
re=S.count('RE')

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

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

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

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

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

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



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

for Si in S:
    answer[Si] += 1

print('AC x ' + str(answer.get('AC')))
print('WA x ' + str(answer.get('WA')))
print('TLE x ' + str(answer.get('TLE')))
print('RE x ' + str(answer.get('RE')))

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

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

Solution (Python):
N = int(input())
s = [input() for i in range(N)]
row = ['AC', 'WA', 'TLE', 'RE']
for r in row:
    count = 0
    for col in s:
        if col == r:
            count += 1
    print(r, 'x', count, sep=' ')

Solution (Python):
def main():
    N = int(input())
    S = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    judge = ''
    for i in range(N):
        judge = input()
        S[judge] += 1

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

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

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

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

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

for j in list:
  if j == 'AC':
    C0 = C0 + 1
  elif j == 'WA':
    C1 = C1 + 1
  elif j == 'TLE':
    C2 = C2 + 1
  elif j == 'RE':
    C3 = C3 + 1
    
print('AC x %d' % C0)
print('WA x %d' % C1)
print('TLE x %d' % C2)
print('RE x %d' % C3)

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

for x in range(n):
  k=input()
  if k=="AC":
    a+=1
  elif k=="WA":
    b+=1
  elif k=="TLE":
    c+=1
  else:
    d+=1

print("AC x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))

Solution (Python):
n = int(input()); s = []
for _ in range(n):
  s.append(input())
 
dic = {"AC":0,
       "WA":0,
       "TLE":0,
       "RE":0}

for res in s:
  if res in dic: dic[res] += 1
  
for k in dic:
  print(f"{k} x {dic[k]}")

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())
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
	else:
		re+=1
print("AC x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))

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

count_ac=0
count_wa=0
count_tle=0
count_re=0

for i in range(n):
    if s[i]=='AC':
        count_ac+=1
    elif s[i]=='WA':
        count_wa+=1
    elif s[i]=='TLE':
        count_tle+=1
    else:
        count_re+=1

print('AC x '+str(count_ac))
print('WA x '+str(count_wa))
print('TLE x '+str(count_tle))
print('RE x '+str(count_re))

Solution (Python):
N = int(input())
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):
n = int(input())
ac = wa = tle = re = 0
m = [input() for x in range(n)]
for i in range(n):
      if m[i] == "AC":
            ac += 1
      elif m[i] == "WA":
            wa += 1
      elif m[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())
ca=0
cw=0
ct=0
cr=0
for _ in range(N):
  a=input()
  if a=='AC':
    ca+=1
  elif a=='WA':
    cw+=1
  elif a=='TLE':
    ct+=1
  elif a=='RE':
    cr+=1
    
print('AC x',ca)
print('WA x',cw)
print('TLE x',ct)
print('RE x',cr)