Problem:
 Score : 200 points    Problem Statement Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.  The problem has N test cases.  For each test case i ( 1\leq i \leq N ), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is AC , WA , TLE , and RE , respectively.  See the Output section for the output format.      Constraints  1 \leq N \leq 10^5  S_i is AC , WA , TLE , or RE .         Input Input is given from Standard Input in the following format:  N  S_1  \vdots  S_N       Output Let C_0 , C_1 , C_2 , and C_3 be the numbers of test cases for which the verdict is AC , WA , TLE , and RE , respectively. Print the following:  AC x C_0 WA x C_1 TLE x C_2 RE x C_3         Sample Input 1 6
AC
TLE
AC
AC
WA
TLE      Sample Output 1 AC x 3
WA x 1
TLE x 2
RE x 0  We have 3 , 1 , 2 , and 0 test case(s) for which the verdict is AC , WA , TLE , and RE , respectively.       Sample Input 2 10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC      Sample Output 2 AC x 10
WA x 0
TLE x 0
RE x 0

Solution (Python):
N = int(input())
judge = ['AC', 'WA', 'TLE', 'RE']
C = [[], [], [], []]
for i in range(N):
  S = str(input())
  j = judge.index(S)
  C[j].append(i)

Cn = [len(j) for j in C]
for i in range(4):
  print(judge[i], 'x', Cn[i])

Solution (Python):
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 " + str(c[0]))
print("WA x " + str(c[1]))
print("TLE x " + str(c[2]))
print("RE x " + str(c[3]))

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

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

Solution (Python):
n_entradas = int(input())
contador = 0
vetor=[]
while (contador<n_entradas):
    situacao = str(input())
    vetor.append(situacao)
    contador=contador+1    
print('AC x',vetor.count('AC'))
print('WA x',vetor.count('WA'))
print('TLE x',vetor.count('TLE'))
print('RE x',vetor.count('RE'))

Solution (Python):
import sys

from collections import defaultdict, deque, Counter










stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def solve():
    n = int(stdin.readline().rstrip())
    
    
    
    
    
    
    S = []
    for i in range(n):
        s = str(stdin.readline().rstrip())
        S.append(s)
    c = Counter(S)
    print("AC x "+str(c["AC"]))
    print("WA x "+str(c["WA"]))
    print("TLE x "+str(c["TLE"]))
    print("RE x "+str(c["RE"]))

if __name__ == '__main__':
    solve()

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
        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):
import collections
a=int(input())
b=[input() for i in range(a)]

c=collections.Counter(b)
n,m=zip(*c.most_common())
n=list(n)
m=list(m)
result=[0]*4
for i in range(len(n)):
    if n[i]=='AC':
        result[0]=m[i]
    if n[i]=='WA':
        result[1]=m[i]
    if n[i]=='TLE':
        result[2]=m[i]
    if n[i]=='RE':
        result[3]=m[i]
    
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())
s = []
for i in range(n):
    i = input()
    s.append(i)

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

print('AC x', AC_cnt)
print('WA x', WA_cnt)
print('TLE x', TLE_cnt)
print('RE x', RE_cnt)

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

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

Solution (Python):
import collections
s = []
def main():
  n = int(input())
  for i in range(n):
    s.append(input())
  col = collections.Counter(s)
  for i in ['AC','WA','TLE','RE']:
    print(i,'x',col[i])
    
    
if __name__ == '__main__':
  main()

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

Solution (Python):
N=int(input())
A=[]
for i in range(N):
    A.append(input())
a=0
w=0
t=0
r=0
for i in A:
    if i=='AC':
        a+=1
    elif i =='WA':
        w+=1
    elif i =='TLE':
        t+=1
    else:
        r+=1
print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print('RE x '+str(r))

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

result = [input() for _ in range(N)]

C_AC,C_TLE,C_WA,C_RE = [0,0,0,0]

for i in result:
  if i == "AC":
    C_AC += 1
  elif i == "WA":
    C_WA += 1
  elif i == "TLE":
    C_TLE += 1
  elif i == "RE":
    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):
verdicts = {'AC':0,'WA':0,'TLE':0,'RE':0}
N = int(input())
string = []

for i in range(N):
    input_i = input()
    if input_i == 'AC':
        verdicts['AC'] += 1
    elif input_i == 'WA':
        verdicts['WA'] += 1
    elif input_i == 'TLE':
        verdicts['TLE'] += 1
    elif input_i == 'RE':
        verdicts['RE'] += 1

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

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

t = ['AC', 'WA', 'TLE', 'RE']
d = {}
for _ in xrange(n):
    s = raw_input()
    d[s] = d.get(s, 0) + 1
for k in t:
    print '%s x %d' % (k, d.get(k, 0))

Solution (Python):

import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial
from bisect import bisect_left, bisect_right 
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

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

res = defaultdict(int)
for s in S:
    res[s] += 1


ans = ['AC', 'WA', 'TLE', 'RE']
for an in ans:
    if res[an]>0:
        print(an, 'x', res[an])
    else:
        print(an, 'x', 0)

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

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

c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i in range(n):
    judge = input()
    if judge == "AC":
        c0 += 1
    elif judge == "WA":
        c1 += 1
    elif judge == "TLE":
        c2 += 1
    else:
        c3 += 1

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

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

Solution (Python):
data = {
    "AC":0,
    "WA":0,
    "TLE":0,
    "RE":0
    }

n = int(input())
for i in range(n):
    t = input()
    data[t] += 1

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

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

a=0
w=0
t=0
r=0

for i in range(tr):
   
    word=input()
    if word=='AC':
        a+=1
    elif word=='WA':
        w+=1
    elif word=='TLE':
        t+=1
    else:
        r+=1
print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print('RE x '+str(r))

Solution (Python):
d={"AC":0, "WA":0, "TLE":0, "RE":0}
n = int(input())
for i in range(n):
    a = input()
    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):
cnt = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(int(input())):
               s = input()
               cnt[s] += 1
for i in ['AC','WA','TLE','RE']:
               print(f'{i} x {cnt[i]}')

Solution (Python):
s = []
for _ in range(int(input())):
    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())
S = [input() for i in range(N)]

dic = {}
dic["TLE"]=0
dic["AC"]=1
dic["WA"]=2
dic["RE"]=3

arr = [0 for i in range(4)]

for i in range(len(S)):
  arr[dic[S[i]]] += 1

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log,gcd
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 operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')



 
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix

 

def ii(): return int(sys.stdin.readline().rstrip()) 
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) 
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]

def ss(): return sys.stdin.readline().rstrip() 
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) 
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]





n=ii()
ans=[0,0,0,0]

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

for i in range(4):
    if i==0:
        print("AC x "+str(ans[0]))
    elif i==1:
        print("WA x "+str(ans[1]))
    elif i==2:
        print("TLE x "+str(ans[2]))
    else:
        print("RE x "+str(ans[3]))

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

Solution (Python):
from sys import stdin,stdout
import math
from collections import Counter,defaultdict
LI=lambda:list(map(int,input().split()))
MAP=lambda:map(int,input().split())
IN=lambda:int(input())
S=lambda:input()

def case():
    a=b=c=d=0
    for i in range(IN()):
        s=S()
        if s=="AC":a+=1
        elif s=="TLE":b+=1
        elif s=="WA":c+=1
        else:d+=1
    print("AC","x",a)
    print("WA","x",c)
    print("TLE","x",b)
    print("RE","x",d)
for _ in range(1):
    case()

Solution (Python):
N = int(input())
a=b=c=d = 0
for i in range(N):
  char = input()
  if char =='AC':
    a += 1
  if char =='WA':
    b += 1
  if char =='TLE':
    c += 1
  if char =='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):

count = int(input())

a = 0
b = 0
c = 0
d = 0
while count:
	val = input()
	
	if val == 'AC':
		a += 1
	elif val == 'WA':
		b += 1
	elif val == 'TLE':
		c += 1
	elif val == 'RE':
		d += 1
	count -= 1

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

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

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

Solution (Python):
t = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(t):
    s = str(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):
d = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
N = int(input())
for i in range(N):
    d[input()] += 1
print("AC x "+str(d["AC"]))
print("WA x "+str(d["WA"]))
print("TLE x "+str(d["TLE"]))
print("RE x "+str(d["RE"]))

Solution (Python):
import itertools
import math
import fractions
import functools
import copy
from collections import deque
from functools import reduce
from decimal import Decimal


def main():
    n = int(input())
    s = []
    c = [0, 0, 0, 0]
    for _ in range(n):
        s.append(input())
    for result in s:
        if result == "AC":
            c[0] += 1
        if result == "WA":
            c[1] += 1
        if result == "TLE":
            c[2] += 1
        if result == "RE":
            c[3] += 1
    for i in range(4):
        if i == 0:
            print("AC x", c[0])
        if i == 1:
            print("WA x", c[1])
        if i == 2:
            print("TLE x", c[2])
        if i == 3:
            print("RE x", c[3])


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
a=b=c=d=0
for i in range(n):
  e = input()
  if e == 'AC':
    a+=1
  elif e == 'WA':
    b +=1
  elif e == 'TLE':
    c+=1
  else:
    d+=1

    

print('AC x '+str(a)+'\n'+'WA x ' +str(b) + '\n'
      +'TLE x '+str(c) +'\n' + 'RE x '+str(d))

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

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

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

Solution (Python):
N =int(input())
counters = {'AC':0,"WA":0,"TLE":0,"RE":0}
for i in range(N):
    code = input()
    if code in counters.keys():
        counters[code] += 1
for k,v in counters.items():
    print(k + " x " + str(v))

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

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

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

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

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    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')))
    return


if __name__ == "__main__":
    solve()

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import accumulate, permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    s = [input() for i in range(n)]
    ac = s.count('AC')
    wa = s.count('WA')
    tle = s.count('TLE')
    re = s.count('RE')
    print('AC x %s' % ac)
    print('WA x %s' % wa)
    print('TLE x %s' % tle)
    print('RE x %s' % re)
    return


if __name__ == "__main__":
    solve()

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    s = [input() for i in range(n)]
    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'))
    return


if __name__ == "__main__":
    solve()

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

Solution (Python):

from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


def LIR(n):
    return [LI() for i in range(n)]


def SR(n):
    return [S() for i in range(n)]


def LSR(n):
    return [LS() for i in range(n)]


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    s = [input() for i in range(n)]
    print('AC x ' + str(s.count('AC')))
    print('WA x ' + str(s.count('WA')))
    print('TLE x ' + str(s.count('TLE')))
    print('RE x ' + str(s.count('RE')))
    return


if __name__ == "__main__":
    solve()

Solution (Python):
import collections
AC=0
WA=0
TLE=0
RE=0
N=int(input())
S=[]
for i in range(N):
  S.append(input())
count=collections.Counter(S)
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())

s = [0 for _ in range(n)]

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


d ={}

for x in s:
    d[x] = d.setdefault(x,0) + 1


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

for i in ans_ar:
    ans = i + " x " + str(d.setdefault(i,0))
    print(ans)

Solution (Python):
if __name__ == '__main__':
    N = int(input())
    res = []
    for _ in range(N):
        res.append(str(input()))
    print('AC x {}'.format(res.count('AC')))
    print('WA x {}'.format(res.count('WA')))
    print('TLE x {}'.format(res.count('TLE')))
    print('RE x {}'.format(res.count('RE')))

Solution (Python):
n = int(input())
stat2id = {
  "AC": 0,
  "WA": 1,
  "TLE": 2,
  "RE": 3,
}
id2stat = {i:s for s,i in stat2id.items()}
count = [0 for _ in range(4)]

for i in range(n):
  s = input()
  count[stat2id[s]] += 1
for i, c in enumerate(count):
  print(id2stat[i], "x", c)

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

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

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

Solution (Python):
from collections import OrderedDict

def solve(n, s):
    d = OrderedDict([
        ("AC", 0),
        ("WA", 0),
        ("TLE", 0),
        ("RE", 0)
    ])
    for i in range(n):
        d[s[i]] += 1
    for k, v in d.items():
        print("%s x %d" % (k, v))

n = int(input())
s = [input() for i in range(n)]
solve(n, s)

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

Solution (Python):
N = int(input())
S = ['']*N
for i in range(N):
    S[i] = input()
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):
from collections import defaultdict
N=int(input())
d=defaultdict(int)
for i in range(N):
  x=input()
  d[x]+=1
print('AC x '+str(d['AC']))
print('WA x '+str(d['WA']))
print('TLE x '+str(d['TLE']))
print('RE x '+str(d['RE']))

Solution (Python):
n = int(input())
result = [input() for _ in range(n)]
result_ref = ["AC", "WA", "TLE", "RE"]
count = [0, 0, 0, 0]
for i in result:
    if i==result_ref[0]:
        count[0]+=1
    elif i==result_ref[1]:
        count[1]+=1
    elif i==result_ref[2]:
        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())
c0 = c1 = c2 = 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 {}\nWA x {}\nTLE x {}\nRE x {}'.format(c0, c1, c2, c3))

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

num = 0 
strings = ['AC', 'WA', 'TLE', 'RE']
num_list = [0]*len(strings)
for i in range(N):
    if S[i] in strings:
        num_list[strings.index(S[i])] += 1
for i in range(len(strings)):
    print(strings[i], ' x ', num_list[i])

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

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

for i in range(0, nums):
    input_str = input()
    if input_str in S:
        S[input_str] += 1

print('AC x %d' % S['AC'])
print('WA x %d' % S['WA'])
print('TLE x %d' % S['TLE'])
print('RE x %d' % S['RE'])

Solution (Python):
from collections import defaultdict as dd
d = dd(int)
for _ in range(int(input())):
    s = input()
    d[s]+=1
print (('AC x '), end = '')
print (d['AC'])
print (('WA x '), end = '')
print (d['WA'])
print (('TLE x '), end = '')
print (d['TLE'])
print (('RE x '), end = '')
print (d['RE'])

Solution (Python):
N=int(input())
a=0
w=0
t=0
r=0
for _ in range(N):
	s=input()
	if s=='AC':
		a+=1
	elif s=='WA':
		w+=1
	elif s=='TLE':
		t+=1
	else:
		r+=1
print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print('RE x '+str(r))

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

ac = s.count('AC')
wa = s.count('WA')
tle = s.count('TLE')
re = s.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 i in range(N)]

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

for i in range(N):
  if S[i]=='AC':
    C0 += 1
  elif S[i]=='WA':
    C1 += 1
  elif S[i]=='TLE':
    C2 += 1
  elif S[i]=='RE':
    C3 += 1

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

Solution (Python):
N=int(input())
c_0=0
c_1=0
c_2=0
c_3=0
for i in range(N):
  s_i=input()
  if s_i=="AC":
    c_0=c_0+1
  elif s_i=="WA":
    c_1=c_1+1
  elif s_i=="TLE":
    c_2=c_2+1
  elif s_i=="RE":
    c_3=c_3+1
print("AC x "+str(c_0))
print("WA x "+str(c_1))
print("TLE x "+str(c_2))
print("RE x "+str(c_3))

Solution (Python):
N = int(input())
AWTR = [0,0,0,0]
for i in range(N):
    T = input()
    AWTR["AWTR".index(T[0])] += 1
A,W,T,R = AWTR
print(f"""AC x {A}
WA x {W}
TLE x {T}
RE x {R}
""")

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

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

Solution (Python):
n = int(input())
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):
import sys
sys.setrecursionlimit(10 ** 9)

def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')







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

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



if __name__ == '__main__':
    solve()

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

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

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

for cases in judge:
  print(cases + " x " + str(judge[cases]))

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

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






if __name__ == '__main__':
    solve()

Solution (Python):
N = int(input())
s = [input() for i in range(N)]
for v in ['AC', 'WA', 'TLE', 'RE']:
  print('{0} x {1}'.format(v, s.count(v)))

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

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


L = 0
K = 0
J = 0
H = 0
for i in range(N):
  if S[i] == "AC":
    L += 1    
  if S[i] == "WA":
    K += 1 
  if S[i] == "TLE":
    J += 1
  if S[i] == "RE":
    H += 1
print("AC x "+str(L))  
print("WA x "+str(K))
print("TLE x "+str(J))
print("RE x "+str(H))

Solution (Python):


N = int(input())

ans = [0,0,0,0]

for i in range(N):
    S = str(input())
    if S == 'AC':
        ans[0] += 1
    elif S == 'WA':
        ans[1] += 1
    elif S == 'TLE':
        ans[2] += 1
    elif S == '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())
countlist={'AC':0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
    i=input()
    if i =='AC':
        countlist['AC']+=1
    elif i == 'WA':
        countlist["WA"]+=1
    elif i == 'TLE':
        countlist["TLE"]+=1
    else:
        countlist["RE"]+=1

def main():
    for i in countlist:
        print('{0} x {1}'.format(i,countlist[i]))

main()

Solution (Python):
n = int(input())
s = [input() for _ in range(n)]
acn = s.count("AC")
wan = s.count("WA")
tlen = s.count("TLE")
ren = s.count("RE")

print("AC x {}".format(acn))
print("WA x {}".format(wan))
print("TLE x {}".format(tlen))
print("RE x {}".format(ren))

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

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

Solution (Python):
N = int(input())
(a,w,t,r) = (0,0,0,0)
for i in range(N):
  s = input()
  if s == 'AC':
    a += 1
  elif s == 'WA':
    w += 1
  elif s == 'TLE':
    t += 1
  elif s == 'RE':
    r += 1
    
print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print( 'RE x '+str(r))

Solution (Python):
answer = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(int(input())):
    answer[input()] += 1
for i, j in answer.items():
    print(i + ' x ' + str(j))

Solution (Python):
n=int(input())
l=[]
for i in range(n):
  l.append(input())
a=0
b=0
c=0
d=0
for i in l:
  if i=='AC':
    a+=1
  elif i=='WA':
    b+=1
  elif i=='TLE':
    c+=1
  else:
    d+=1
print('AC x',a)
print('WA x',b)
print('TLE x',c)
print('RE x',d)

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

s_list = []
ac = wa = tle = re = 0
for i in range(n):
    s_list.append(input())

for x in range(len(s_list)):
    if s_list[x] == "AC":
        ac += 1
    elif s_list[x] == "WA":
        wa += 1
    elif s_list[x] == "TLE":
        tle += 1
    elif s_list[x] == "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):

"""
Created on Thu Jul  9 15:39:52 2020

@author: TatsuyaYamamoto
"""

N = int(input())

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

for i in range(N):
    temp = input()
    if temp == 'AC':
        AC += 1
    elif temp == 'WA':
        WA += 1
    elif temp == '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))