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

cnt_ac = 0
cnt_wa = 0
cnt_tle = 0
cnt_re = 0

for i in range(n):
  s = str(input())
  if s == 'AC':
    cnt_ac += 1
  elif s == 'WA':
    cnt_wa += 1
  elif s == 'TLE':
    cnt_tle += 1
  elif s == 'RE':
    cnt_re += 1
    
print('AC x {}'.format(cnt_ac))
print('WA x {}'.format(cnt_wa))
print('TLE x {}'.format(cnt_tle))
print('RE x {}'.format(cnt_re))

Solution (Python):


N = int(input())


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

print(S)
"""

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

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

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

for i, j in zip(data.keys(), data.values()):
    print(i + " x " + str(j))

Solution (Python):
from collections import Counter


def A(x):
  return 1000 - x % 1000 if x % 1000 != 0 else 0


def B(n, ss):
  keys_values = Counter(ss)
  orders = ['AC', 'WA', 'TLE', 'RE']
  for order in orders:
    if order in keys_values:
      print("{} x {}".format(order, keys_values[order]))
    else:
      print("{} x {}".format(order, 0))


def C(n, m, k, a, b):
  pass


def main():
  n = int(input())
  ss = []
  for i in range(n):
    ss.append(input())
  B(n, ss)


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
  elif(S=='RE'):
    RE+=1

print("AC x "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

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

ans=dict()

results = ('AC','WA','TLE','RE')
for r in results:
    ans[r]=0

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

for r in results:
    
    p = "{0} x {1}".format(r,str(ans[r]))
    print(p)

Solution (Python):
n = int(input())
judge = {}
judge['AC'] = 0
judge['WA'] = 0
judge['TLE'] = 0
judge['RE'] = 0

for i in range(n):
    s = input()
    if s == 'AC':
        judge['AC'] += 1
    if s == 'WA':
        judge['WA'] += 1
    if s == 'TLE':
        judge['TLE'] += 1
    if s == 'RE':
        judge['RE'] += 1
for key, value in judge.items():
    print("{} x {}".format(key, value))

Solution (Python):
from collections import Counter
n = int(input())
l = []
for _ in range(n):
	l.append(input().rstrip())
ct = Counter(l)

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

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

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

Solution (Python):
n = int(input())
ac, wa, tle, re = 0, 0, 0, 0
i = 0
while i < n:
    c = input()
    if c == "AC":
        ac += 1
    elif c == "WA":
        wa += 1
    elif c == "TLE":
        tle += 1
    elif c == "RE":
        re += 1
    i += 1

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

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

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

Solution (Python):
from collections import defaultdict
n = int(input())
d=defaultdict(int)
for _ in range(n):
    s=input()
    d[s]+=1

moji=['AC', 'WA', 'TLE', 'RE' ]
for i in range(4):
    print(moji[i],'x',d[moji[i]])

Solution (Python):
n = int(input())
S = list(input() for i in range(n))

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

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

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

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 _ in range(n)]
Count = {'AC' : 0,
         'WA' : 0,
         'TLE' : 0,
         'RE' : 0
        }
for s in S:
  Count[s] += 1

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

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

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

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

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

Solution (Python):
num = int(input())
ac_num = 0
wa_num = 0
tle_num = 0
re_num = 0
for i in range(num):
    s = input()
    if(s=='AC'):
        ac_num += 1
    elif(s=='WA'):
        wa_num += 1
    elif(s=='TLE'):
        tle_num += 1
    else:
        re_num += 1

print('AC x '+str(ac_num))
print('WA x '+str(wa_num))
print('TLE x '+str(tle_num))
print('RE x '+str(re_num))

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


if __name__ == '__main__':
    main()

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

Solution (Python):
AC = 0
WA = 0
TLE = 0
RE = 0

N = int(input())
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('AC', 'x', AC)
print('WA', 'x', WA)
print('TLE', 'x', TLE)
print('RE', 'x', RE)

Solution (Python):
n=int(input())
a=[input() for i in range(n)]
cnt=[0]*4
jud=['AC x','WA x','TLE x','RE x']
for i in a:
    if i=='AC':
        cnt[0]+=1
    if i=='WA':
        cnt[1]+=1
    if i=='TLE':
        cnt[2]+=1
    if i=='RE':
        cnt[3]+=1
for i in range(4):
    print(jud[i],cnt[i])

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

Solution (Python):
import collections
d={}
d["AC"]=0
d["WA"]=0
d["TLE"]=0
d["RE"]=0
n=int(input())
for i in range(n):
    s=str(input())
    d[s]+=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())
S = list(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 collections
import itertools
N = int(input())
S = [input().split() for i in range(N)]
S1 = list(itertools.chain.from_iterable(S))
cnt = collections.Counter(S1)

print('AC x ' + str(cnt['AC']))
print('WA x ' + str(cnt['WA']))
print('TLE x ' + str(cnt['TLE']))
print('RE x ' + str(cnt['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())
inList = [input() for i in range(n)]
cntList = [0, 0, 0, 0]
for i in inList:
    if i == 'AC':
        cntList[0] += 1
    elif i == 'WA':
        cntList[1] += 1
    elif i == 'TLE':
        cntList[2] += 1
    elif i == 'RE':
        cntList[3] += 1
print('AC x '+str(cntList[0]))
print('WA x '+str(cntList[1]))
print('TLE x '+str(cntList[2]))
print('RE x '+str(cntList[3]))

Solution (Python):

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

Solution (Python):
n=int(input())
c_0=0
c_1=0
c_2=0
c_3=0
for i in range(n):
    s=input()
    if s=="AC":
        c_0+=1
    elif s=="WA":
        c_1+=1
    elif s=="TLE":
        c_2+=1
    else:
        c_3+=1
print("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):
from collections import Counter
N = int(input())
S = [input() for i in range(N)]
C = Counter(S)
C0 = C["AC"]
C1 = C["WA"]
C2 = C["TLE"]
C3 = C["RE"]
print(f"AC x {C0}")
print(f"WA x {C1}")
print(f"TLE x {C2}")
print(f"RE x {C3}")

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

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

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

Solution (Python):
N=int(input())
L=[]
for i in range(N):
    L.append(input())
C=[]
W=['AC', 'WA', 'TLE', 'RE' ]
Q=[0,0,0,0]
for i in range(N):
    for j in range(4):
        if L[i]==W[j]:
            Q[j]=Q[j]+1
            break
print('AC x '+str(Q[0]))
print('WA x '+str(Q[1]))
print('TLE x '+str(Q[2]))
print('RE x '+str(Q[3]))

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

a = [0]*4
for i in range(n):
    s = input()
    if s == 'AC':
        a[0] += 1
    elif s == 'WA':
        a[1] += 1
    elif s == '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):
n = int(input())

l = [0]*4
w = ["AC","WA","TLE","RE"]

for i in range(n):
    s = input()
    if s == "AC":
        l[0] += 1
    elif s == "WA":
        l[1] += 1
    elif s == "TLE":
        l[2] += 1
    else:
        l[3] +=1
        
for i in range(4):
    print(w[i] + " x " + str(l[i]))

Solution (Python):



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


for i in range(num):
    word = input()
    if word == "AC":
        AC = AC + 1
    elif word == "WA":
        WA = WA + 1
    elif word == "TLE":
        TLE = TLE + 1
    else:
        RE = RE + 1
        
print("AC x "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

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

for k in range(N):
    a = input()
    S.append(a)

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

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

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

Solution (Python):
n = int(input())
li=[]
for z in range(n):
    li.append(input())
acc = li.count('AC')
wrg = li.count('WA')
time = li.count('TLE')
run_time = li.count('RE')
print(f"AC x {acc}")
print(f"WA x {wrg}")
print(f"TLE x {time}")
print(f"RE x {run_time}")

Solution (Python):
'''
.append(要素) リストに要素を追加
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前
sort()
sorted(reverse=true)
配列の初期化
配列名=[a]*n+[b]*m
Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
from functools import reduce
from operator import mul
from collections import Counter
import itertools
import fractions
import sys
ac = 0
wa = 0
tle = 0
re = 0
num = int(stdin.readline().rstrip())
for el in range(num):
    st = stdin.readline().rstrip()
    if st == 'AC':
        ac += 1
    if st == 'WA':
        wa += 1
    if st == 'TLE':
        tle += 1
    if st == '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())
d = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
  s = input()
  d[s] += 1
for i in ['AC','WA','TLE','RE']:
  print(i,'x',d[i])

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Counter = Counter(S)
print("AC x ", str(Counter['AC']))
print("WA x ", Counter['WA'])
print("TLE x ", Counter['TLE'])
print("RE x ", Counter['RE'])

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

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

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

Solution (Python):
from math import *
from copy import *
from string import *				
from random import *
from sys import stdin,stdout
from sys import maxsize
from operator import *				
from itertools import *
from collections import Counter		
import math
import math
import time
from queue import Queue


def seive(n):
	l=[True]
	l=l*(n+1)
	for i in range(2,int(sqrt(n))+1):
		if(l[i]==True):
			val=i*i
			while(val<len(l)):
				l[val]=False
				val+=i
	prime=[]
	for i in range(2,len(l)):
		if(l[i]==True):
			prime.append(i)
	return prime

def dp(l,i,n,val,ans):
	if(i>=n or val<0):
		return 1000000
	elif(val==0):
		return 0
	else:
		if(ans[i]==1000000):
			ans[i]=min(min(1+dp(l,i+1,n,val-l[i],ans),1+dp(l,i,n,val-l[i],ans)),dp(l,i+1,n,val,ans))
		return ans[i]
from queue import Queue
def factors(n):
	l=[]
	for i in range(1,int(sqrt(n))+1):
		if(n%i==0):
			if(n//i==i):
				l.append(i)
			else:
				l.append(i)
				l.append(n//i)
	return l
def check1(s,v,x):
	while(True):
		if(v not in s):
			return v
		else:
			v-=1
def check2(s,v,x):
	while(True):
		if(v not in s):
			return v
		else:
			v+=1

def up(n):
	j=n-1
	while(j>0):
		if(n%j==0):
			break
		j-=1
	return j		
def fac(n):
	c=1
	i=1
	while(i<=n):
		c*=i
		i+=1
	return c
def check_happy(n):
	ss=set()
	print(n)
	while(n!=1):
		val=n
		s=0
		print(val)
		while(val!=0):
			s+=(val%10)**2
			val=val//10
		print(val)
		print("hi")
		if(val in ss):
			return False
		else:
			n=val
			ss.add(n)
	return True
if __name__ == '__main__':
	t=int(input())
	ac=0
	wa=0
	tle=0
	re=0
	for i in range(t):
		s=str(input())
		if(s=="AC"):
			ac+=1
		elif(s=="WA"):
			wa+=1
		elif(s=="TLE"):
			tle+=1
		elif(s=="RE"):
			re+=1
	s1="AC"+" x "+str(ac)
	s2="WA"+" x "+str(wa)
	s3="TLE"+" x "+str(tle)
	s4="RE"+" x "+str(re)
	print(s1)
	print(s2)
	print(s3)
	print(s4)

Solution (Python):
def main():
    num = int(input())
    inputlist = [input() for i in range(num)]
    print("AC x ", inputlist.count("AC"))
    print("WA x ", inputlist.count("WA"))
    print("TLE x ", inputlist.count("TLE"))
    print("RE x ", inputlist.count("RE"))


if __name__ == '__main__':
    main()

Solution (Python):
t=int(input())
dic={"AC":0,"WA":0,"TLE":0,"RE":0}
while(t>0):
    s=input()
    if(s=="AC"):
        dic["AC"]+=1
    elif(s=="WA"):
        dic["WA"]+=1
    elif(s=="TLE"):
        dic["TLE"]+=1
    elif(s=="RE"):
        dic["RE"]+=1
    t-=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())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  x=input()
  if x=="AC":
    ac+=1
  elif x=="WA":
  	wa+=1
  elif x=="TLE":
  	tle+=1
  elif x=="RE":
    re+=1
print("AC x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle)) 
print("RE x "+str(re))

Solution (Python):

def main():
    N = int(input())
    dic = {"AC":0, "WA":0, "TLE":0, "RE":0}
    for i in range(N):
        dic[input()]+=1
    for j in dic:
        print("{} x {}".format(j,dic[j]))

if __name__ == "__main__":
    main()

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

AC = 0
TLE = 0
WA = 0
RE = 0
chara = []
for i in range(0,number):
    a = input()
    if(a == 'AC'):
        AC = AC + 1
    elif(a == 'TLE'):
        TLE = TLE + 1
    elif (a == 'WA'):
        WA = WA + 1
    elif (a == 'RE'):
        RE = RE + 1

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

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

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

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

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

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

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

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

for key in ['AC', 'WA', 'TLE', 'RE']:
  print('{} x {}'.format(key, d[key]))

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

from collections import Counter

n = int(input())

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

s = Counter(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']))

Solution (Python):
n = int(input())
s_list = []
ans_list = [0, 0, 0, 0]

for i in range(n):
    s_list.append(input())

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

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

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

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

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

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


from collections import Counter

n = int(input())
s_c = Counter([input() for x in range(n)])

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

Solution (Python):
n = int(input())
s = [""]*n
for i in range(n):
  s[i] = input()
ac,wa,tle,re = 0,0,0,0
for i in range(n):
  if s[i] == "AC":
    ac += 1
  elif s[i] == "WA":
    wa += 1
  elif s[i] == "TLE":
    tle += 1
  else:
    re += 1
print("AC x %d\nWA x %d\nTLE x %d\nRE x %d" % (ac,wa,tle,re))

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

Solution (Python):
import sys


def resolve():
    readline = sys.stdin.readline    

    N = int(readline())
    ac, wa, tle, re = 0, 0, 0, 0
    for _ in range(N):
        judge = readline().strip()
        if judge == 'AC':
            ac += 1
        elif judge == 'WA':
            wa += 1
        elif judge == 'TLE':
            tle += 1
        elif judge == 'RE':
            re += 1
    print(f'AC x {ac}', f'WA x {wa}', f'TLE x {tle}', f'RE x {re}', sep='\n')


if __name__ == "__main__":
    resolve()

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

c = [0,0,0,0]

for i in range(n):
    s = str(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())
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):
n = int(input())

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

for _ in range(n):
  s = input()
  if s == 'AC':
    ac += 1
  elif s == 'WA':
    wa += 1
  elif s ==  'TLE':
    tle += 1
  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))

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):
a = int(input())
i = 0
o = 0
p = 0
s = 0
l = 0
while i < a :
    b = input()
    if b == "AC" :
        o = o + 1
    if b == "WA" :
        p = p + 1
    if b == "TLE" :
        s = s + 1
    if b == "RE" :
        l = l + 1
    i = i + 1
print("AC" , "x" , o)
print("WA" , "x" , p)
print("TLE" , "x" , s)
print("RE" , "x" , l)

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):
N = int(input())
A = W = T = R = 0
for i in range(N):
  S = input()
  if S == "AC":
    A+=1
  elif S == "WA":
    W +=1
  elif S =="TLE":
    T +=1
  else:
    R +=1
for judge, c in zip(["AC","WA","TLE","RE"],[A,W,T,R]):
  print(judge+" x "+ str(c))

Solution (Python):
count = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(int(input())):
  count[input()] += 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):
import collections
from typing import Counter

if __name__ == "__main__":
    N = int(input())
    S = []
    for _ in range(N):
        S.append(input())
    counter = dict(collections.Counter(S))
    try:
        print(f"AC x {counter['AC']}")
    except:
        print(f"AC x {0}")
    try:
        print(f"WA x {counter['WA']}")
    except:
        print(f"WA x {0}")

    try:
        print(f"TLE x {counter['TLE']}")
    except:
        print(f"TLE x {0}")

    try:
        print(f"RE x {counter['RE']}")
    except:
        print(f"RE x {0}")

Solution (Python):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    ans = input()
    if ans == 'AC':
        AC += 1
    elif ans == 'WA':
        WA += 1
    elif ans == 'TLE':
        TLE += 1
    elif ans == 'RE':
        RE += 1
print('AC x {}'.format(AC))
print('WA x {}'.format(WA))
print('TLE x {}'.format(TLE))
print('RE x {}'.format(RE))

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10**6)

n=int(input().rstrip())
d={"AC":0,"WA":1,"TLE":2,"RE":3}
cnt=[0]*4
for _ in range(n):
    s=input().rstrip()
    cnt[d[s]]+=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())
c1,c2,c3,c4=0,0,0,0
for i in range(n):
  s=input()
  if(s=='AC'):
    c1+=1
  elif(s=='WA'):
    c2+=1
  elif(s=='TLE'):
    c3+=1
  else:
    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())
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
    result=input()
    if result=="AC":
        AC+=1
    elif result == "WA":
        WA+=1
    elif result == "TLE":
        TLE += 1
    else:
        RE+=1

print("AC x "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

Solution (Python):
import sys
input = sys.stdin.readline
from collections import Counter
N=int(input())
S=Counter([input().strip() for i in range(N)])

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):
s = [input() for i in range(1)] 
s0 = int(s[0])
t = [input() for i in range(s0)]
ac_count=0
wa_count=0
tle_count=0
re_count=0

for j in range(s0):
    s1 = t[j]
    if s1 == "AC":
        ac_count+=1
    if s1 == "WA":
        wa_count+=1
    if s1 == "TLE":
        tle_count+=1
    if s1 == "RE":
        re_count+=1
print("AC x ",ac_count)
print("WA x ",wa_count)
print("TLE x ",tle_count)
print("RE x ",re_count)

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

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

for i in S:
  if i == "AC":
    AC += 1
  if i == "WA":
    WA += 1
  if i == "TLE":
    TLE += 1  
  if i == "RE":
    RE += 1
    
print("AC","x",AC)
print("WA","x",WA)
print("TLE","x",TLE)
print("RE","x",RE)

Solution (Python):

import os
from sys import stdin, stdout


def solve(tc):
    n = int(stdin.readline().strip())

    res = {
        'AC':0,
        'WA':0,
        'TLE':0,
        'RE':0
    }
    for i in range(n):
        out = stdin.readline().strip()
        res[out] += 1
        
    for k,v in res.items():
        print(k,'x',v)
    


tcs = 1
tc = 1
while tc <= tcs:
    solve(tc)
    tc += 1

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

for i in range(n):
  s = input()
  d[s] += 1
for k,v in d.items():
  print(k,'x',v)

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

n = int(input())
ss = [input().strip() for _ in range(n)]

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

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

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

Solution (Python):
import collections

n = int(input())
case = list(input() for _ in range(n))

cn = collections.Counter(case)

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

Solution (Python):
N=input();
N=int(N);
S=[];
ans=[0,0,0,0];
for i in range(N):
  s=input();
  if s=="AC":
    ans[0]=ans[0]+1;
  if s=="WA":
    ans[1]=ans[1]+1;
  if s=="TLE":
    ans[2]=ans[2]+1;
  if s=="RE":
    ans[3]=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())
ans=[0,0,0,0]
for i in range(n):
  a=str(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):
ans = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}

N = int(input())

for _ in range(N):
    x = input()
    ans[x] += 1

for k, v in ans.items():
    print(f"{k} x {v}")

Solution (Python):
import sys
import heapq, functools, collections
import math, random
from collections import Counter, defaultdict



lst = []

for case_num in range(int(input())):
    
    lst.append(input())

    
c = Counter(lst)


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

Solution (Python):
n = int(input())
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(f'AC x {c0}')
print(f'WA x {c1}')
print(f'TLE x {c2}')
print(f'RE x {c3}')

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

cnt_ac = 0
cnt_wa = 0
cnt_tle = 0
cnt_re = 0
for s in strings:
  if s == 'AC':
    cnt_ac +=1
  elif s == 'WA':
    cnt_wa +=1
  elif s == 'TLE':
    cnt_tle +=1
  elif s == 'RE':
    cnt_re +=1

print('AC x ' +str(cnt_ac))
print('WA x ' +str(cnt_wa))
print('TLE x ' +str(cnt_tle))
print('RE x ' +str(cnt_re))

Solution (Python):
n = int(input())
c = [0 for i in range(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", c[0])
print("WA x", c[1])
print("TLE x", c[2])
print("RE x", c[3])

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

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

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

    if s == "AC":
        ac += 1
    if s == "WA":
       wa += 1
    if s == "TLE":
       tle += 1
    if s == "RE":
       re += 1

a1 = "AC x " + str(ac)
a2 = "WA x " + str(wa)
a3 = "TLE x " + str(tle)
a4 = "RE x " + str(re)

print(a1)
print(a2)
print(a3)
print(a4)

Solution (Python):
AC,WA,TLE,RE=0,0,0,0
for T in range(int(input())):
	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)