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






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

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

Solution (Python):
import collections

n = int(input())
KeyLst = ('AC','WA','TLE','RE')
resultLst = (str(input()) for _ in range(n))
countedDic = collections.Counter(resultLst)
for key in KeyLst:
  print('{} x {}'.format(key,countedDic[key]))

Solution (Python):
import collections

n = int(input())
KeyLst = ['AC','WA','TLE','RE']
resultLst = [str(input()) for _ in range(n)]
countedDic = collections.Counter(resultLst)
for key in KeyLst:
  print('{} x {}'.format(key,countedDic[key]))

Solution (Python):
n = int(input())
KeyLst = ['AC','WA','TLE','RE']
dic = {key:0 for key in KeyLst}
for _ in range(n):
  result = str(input())
  try:
  	dic[result] += 1
  except KeyError as e:
    print(e)
for key in KeyLst:
  print('{} x {}'.format(key,dic[key]))

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

N = int(input())
dic = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(N):
    dic[input().rstrip('\n')] += 1
for k, v in dic.items():
    print(k, 'x', v)

Solution (Python):
n=int(input())
s=[input() for i in range(n)]
c0=0
c1=0
c2=0
c3=0
for i in s:
  if i == 'AC':
    c0+=1
  elif i == 'WA':
    c1+=1
  elif i == 'TLE':
    c2+=1
  else:
    c3+=1
print('AC x '+str(c0))
print('WA x '+str(c1))
print('TLE x '+str(c2))
print('RE x '+str(c3))

Solution (Python):
N=int(input())
a1,a2,a3,a4=0,0,0,0
for i in range(N):
  s=input()
  if s=="AC":
    a1+=1
  elif s=="WA":
    a2+=1
  elif s=="TLE":
    a3+=1
  else:
    a4+=1
print("AC x "+str(a1))
print("WA x "+str(a2))
print("TLE x "+str(a3))
print("RE x "+str(a4))

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

dic['AC'] = 0
dic['WA'] = 0
dic['TLE'] = 0
dic['RE'] = 0

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

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

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

Solution (Python):
N = int(input())
ac, wa, tle, re = 0, 0, 0, 0
for i in range(N):
  d = input()
  if d == "AC":
    ac += 1
  elif d == "WA":
    wa += 1
  elif d == "TLE":
    tle += 1
  elif d == "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):
import sys
input = sys.stdin.readline
enum = enumerate

def linput(ty=int, cvt=list):
	return cvt(map(ty,input().split()))

def vinput(rep=1, ty=int, cvt=list):
	return cvt(ty(input().rstrip()) for _ in [0,]*rep)

def gcd(a: int, b: int):
	while b: a, b = b, a%b
	return a

def lcm(a: int, b: int):
	return a * b // gcd(a, b)

def main():
	N = int(input())
	vS = vinput(N,str)
	
	res = 0

	vT = "AC WA TLE RE".split()
	for t in vT:
		print(t,"x",vS.count(t))
	
	
	
	

if __name__ == "__main__":
	main()

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

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

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

for i in range(n):
    score[input()] += 1
    
for key, value in score.items():
    print('{} x {}'.format(key, value))

Solution (Python):
from collections import defaultdict
x = defaultdict(int)
cc = int(input())
for _ in range(cc):
  ret = input().strip()
  x[ret] += 1
  
order = ['AC', 'WA', 'TLE', 'RE']
for status in order:
  print(f'{status} x {x[status]}')

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

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):
s = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(1,s+1):
    ch = input()
    if ch == "AC":
        ac += 1
    elif ch == "WA":
        wa += 1
    elif ch == "TLE":
        tle +=1
    elif ch == "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())
import collections
co = collections.Counter()
for i in range(n):
    s = input()
    co[s] +=1
print(f"AC x {co['AC']}")
print(f"WA x {co['WA']}")
print(f"TLE x {co['TLE']}")
print(f"RE x {co['RE']}")

Solution (Python):
n=int(input())
nums=[0,0,0,0]
while n>0:
  s=input().strip()[0]
  if s=='A':
    nums[0] += 1
  elif s=='W':
    nums[1] += 1
  elif s=='T':
    nums[2] += 1
  elif s=='R':
    nums[3] += 1
  n -= 1
verds=['AC','WA','TLE','RE']
for i in range(4):
  print('{} x {}'.format(verds[i],nums[i]))

Solution (Python):
n=int(input())
C1=0
C2=0
C3=0
C4=0
for i in range(n):
    k=str(input())
    if k=="AC":
        C1 +=1
    elif k=="WA":
        C2 += 1
    elif k=="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())
l=[]
for i in range(n):
    l.append(str(input()))

C1=l.count("AC")
C2=l.count("WA")
C3=l.count("TLE")
C4=l.count("RE")

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())
status={'AC':0, 'WA':0, 'TLE':0, 'RE':0}
results = [input() for n in range(N)]
for result in results:
     if result in status.keys():
         status[result] += 1
for k, v in status.items():
    print('{} x {}'.format(k, v))

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

Solution (Python):
import collections

N = int(input())
S = []

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

c = collections.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"]))

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


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

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

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

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

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())
from collections import Counter
S=[input() for i in range(N)]
c=Counter(S)
for s in ('AC','WA','TLE','RE'):
    print(s,'x',c[s])

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

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

Solution (Python):
n = int(input())
count = {}
for _ in range(n):
  type = input()
  count.setdefault(type, 0)
  count[type] += 1
for type in ['AC', 'WA', 'TLE', 'RE']:
  if type in count:
    print(type + ' x ' + str(count[type]))
  else:
    print(type + ' x 0')

Solution (Python):
N = int(input())
a = [input() for i in range(N)]
c0 = a.count("AC")
c1 = a.count("WA")
c2 = a.count("TLE")
c3 = a.count("RE")
print("AC x", c0)
print("WA x", c1)
print("TLE x", c2)
print("RE x", c3)

Solution (Python):
from collections import Counter

N = int(input())
ans = Counter()
for i in range(0, N):
    c = str(input())
    ans[c] += 1
print('AC x {}'.format(ans['AC']))
print('WA x {}'.format(ans['WA']))
print('TLE x {}'.format(ans['TLE']))
print('RE x {}'.format(ans['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 _ 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)]
for v in ('AC', 'WA', 'TLE', 'RE'):
    print('{} x {}'.format(v, s.count(v)))

Solution (Python):

N=int(input())
list =[input() for i in range(N)]
count_AC=0
count_WA=0
count_TLE=0
count_RE=0
for i in range(N):
    if list[i] == "AC":
        count_AC+=1
    elif list[i] == "WA":
        count_WA+=1
    elif list[i] == "TLE":
        count_TLE+=1
    elif list[i] == "RE":
        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 = [input() for _ in range(n)]
ac = str(s.count('AC'))
wa = str(s.count('WA'))
tle = str(s.count('TLE'))
re = str(s.count('RE'))
print('AC x '+ ac)
print('WA x ' + wa)
print('TLE x ' + tle)
print('RE x ' + re)

Solution (Python):
n = int(input())
s = []
AC = 0
WA = 0
TLE = 0
RE = 0
for _ in range(n):
    s.append(input())
for i in range(len(s)):
    if s[i] == 'AC':
        AC += 1
    elif s[i] == 'WA':
        WA += 1
    elif s[i] == 'TLE':
        TLE += 1
    elif s[i] == 'RE':
        RE += 1
print("AC x " + str(AC))
print("WA x " + str(WA))
print("TLE x " + str(TLE))
print("RE x " + str(RE))

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

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

for _ in range(N):
    judge = input()
    if judge == "AC":
        ac += 1
    if judge == "WA":
        wa += 1
    if judge == "TLE":
        tle += 1
    if judge == "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):
l={'AC':0,'WA':0,'TLE':0,'RE':0}

n=int(input())
for i in range(n):
  l[input()]+=1
for i in l:
  print(i,"x",l[i])

Solution (Python):
data = {'AC':0,'WA':0,'TLE':0,'RE':0}
N = int(input())
for i in range(N):
  inputSTR = input()
  data[inputSTR] = data[inputSTR] + 1
  
for key,value in data.items():
  print(key + ' x ' + str(value))

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())
result = []
for i in range(0, n):
    temp_value = input()
    result.append(temp_value)
print('AC x ' + str(result.count('AC')))
print('WA x ' + str(result.count('WA')))
print('TLE x ' + str(result.count('TLE')))
print('RE x ' + str(result.count('RE')))

Solution (Python):
N = int(input())
list1=[]
for i in range(N):
  a = input()
  list1.append(a)  
  
a = list1.count('AC')
b = list1.count('WA')
c = list1.count('TLE')
d = list1.count('RE')
list2 = [a,b,c,d]
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())
d = {
	'AC': 0,
	'WA': 0,
	'TLE': 0,
	'RE': 0
}

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

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

Solution (Python):
n = int(input())
freq = {k: 0 for k in ['AC', 'WA', 'TLE', 'RE']}
for _ in range(n):
    freq[input()] += 1
for k, v in freq.items():
    print(f'{k} x {v}')

Solution (Python):
n = int(input())
ans = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for _ in range(n):
    s = input()
    if s in ans:
        ans[s] += 1
    else:
        ans[s] = 1

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

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

Solution (Python):
number = int(input())
 
ac = 0
wa = 0
tle = 0
re = 0
for i in range(number):
  character = input()
  if character == 'AC':
    ac += 1
  if character == 'WA':
    wa += 1
  if character == 'TLE':
    tle += 1
  if character == '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())
l = []
for i in range(n):
    a = input()
    l.append(a)
print("AC" , "x" , l.count("AC"))
print("WA" , "x" , l.count("WA"))
print("TLE" , "x" , l.count("TLE"))
print("RE" , "x" , l.count("RE"))

Solution (Python):
types = ['AC', 'WA', 'TLE', 'RE']
cntLn = [0] * 4
N = int(input())
for i in range(N):
    tmp = input()
    try:
        idx = types.index(tmp)
        cntLn[idx] += 1
    except ValueError as err:
        print("This is value error. -> ", err)
        exit()
for num, value in enumerate(types):
    print(value, "x", str(cntLn[num]))

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

Solution (Python):
n = int(input())
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())
s = [input() for _ in range(n)]
j = [0]*4

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

l = ["AC", "WA", "TLE", "RE"]
for i in range(4):
    print("{} x {}".format(l[i], j[i]))

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

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

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

Solution (Python):
n = int(input())
S = [input() for _ in range(n)]
print("AC x {}".format(S.count('AC')))
print("WA x {}".format(S.count('WA')))
print("TLE x {}".format(S.count('TLE')))
print("RE x {}".format(S.count('RE')))

Solution (Python):

n = int(input())
AC, WA, TLE, RE = 0, 0, 0, 0
for _ 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 {0}".format(AC))
print("WA x {0}".format(WA))
print("TLE x {0}".format(TLE))
print("RE x {0}".format(RE))

Solution (Python):
from sys import stdin,stdout
d={}
for _ in range(int(stdin.readline())):
    
    s=input()
    d[s]=d.get(s,0)+1
print('AC x',d.get('AC',0))
print('WA x',d.get('WA',0))
print('TLE x',d.get('TLE',0))
print('RE x',d.get('RE',0))

Solution (Python):
from collections import defaultdict

types = ['AC', 'WA', 'TLE', 'RE']
num = int(input())
categories = defaultdict(int)

for i in range(num):
    categories[input()] += 1

for i in types:
    print("{} x {}".format(i, categories[i]))

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

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):
import sys
a=[]
l=0
C0=0
C1=0
C2=0
C3=0
names=["AC","WA","TLE","RE"] 
for i in sys.stdin:
  a.append(i.rstrip('\n'))
  if a[l]==names[0]:
    C0+=1
  elif a[l]==names[1]:
    C1+=1
  elif a[l]==names[2]:
    C2+=1
  elif a[l]==names[3]:
    C3+=1
  l+=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())
testcase = []
for n in range(n):
    testcase.append(input())
    
    
print("AC x ",testcase.count("AC"))
print("WA x ",testcase.count("WA"))
print("TLE x ",testcase.count("TLE"))
print("RE x ",testcase.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):
num = int(input())
ac = 0
tle = 0
wa = 0
re = 0
 
for i in range(num):
  word = input()
  if word == "AC":
    ac += 1
  if word == "TLE":
    tle += 1
  if word == "WA":
    wa += 1
  if word == "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):
mp1 = {}
mp2 = {}
cnt = [0] * 4

mp1['AC'] = 0
mp1['WA'] = 1
mp1['TLE'] = 2
mp1['RE'] = 3

mp2[0] = 'AC'
mp2[1] = 'WA'
mp2[2] = 'TLE'
mp2[3] = 'RE'

n = int(input())

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

for i in range(4):
	print(mp2[i], 'x', cnt[i])

Solution (Python):
N = int(input())
S = [input() for _ in range(N)]
for x in ['AC', 'WA', 'TLE', 'RE']:
    print(x + ' x ' + str(S.count(x)))

Solution (Python):
N = int(input())
lst = [input() for _ in range(N)]
V=["AC","WA","TLE","RE"]
for v in V:
    print("{} x {}".format(v, lst.count(v)))

Solution (Python):
import collections

N = int(input())
L = [input() for _ in range(N)]
c = collections.Counter(L)
V = ["AC", "WA", "TLE", "RE"]
for v in V:
    print("{} x {}".format(v, c[v]))

Solution (Python):
N = int(input()) 
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
  word=input()
  if(word=='AC'):
    AC+=1
  elif(word=='WA'):
    WA+=1
  elif(word=='TLE'):
    TLE+=1
  else:
    RE+=1
print('AC x %d' %AC )
print('WA x %d' %WA )
print('TLE x %d' %TLE )
print('RE x %d' %RE )

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

print("AC x %d" % str.count("AC"))
print("WA x %d" % str.count("WA"))
print("TLE x %d" % str.count("TLE"))
print("RE x %d" % str.count("RE"))

Solution (Python):
from itertools import groupby
n = int(input())
s = [input() for _ in range(n)]
print('AC x {}'.format(s.count('AC')))
print('WA x {}'.format(s.count('WA')))
print('TLE x {}'.format(s.count('TLE')))
print('RE x {}'.format(s.count('RE')))

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

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

for e in range(n):
	entrada = input()
	if entrada == "AC":
		dic["AC"] += 1
	elif entrada == "WA":
		dic["WA"] += 1
	elif entrada == "TLE":
		dic["TLE"] += 1
	elif entrada == "RE":
		dic["RE"] += 1
		
print("AC x %d"% dic["AC"])
print("WA x %d"% dic["WA"])
print("TLE x %d"% dic["TLE"])
print("RE x %d"% dic["RE"])

Solution (Python):
from sys import stdin
def main():
    
    readline=stdin.readline
    n=int(readline())
    li=[0]*4
    for i in range(n):
        tmp=readline().strip()
        if tmp=="AC":
            li[0]+=1
        elif tmp=="WA":
            li[1]+=1
        elif tmp=="TLE":
            li[2]+=1
        elif tmp=="RE":
            li[3]+=1
    
    for i in range(4):
        if i==0:
            print("AC x {}".format(li[0]))
        elif i==1:
            print("WA x {}".format(li[1]))
        elif i==2:
            print("TLE x {}".format(li[2]))
        elif i==3:
            print("RE x {}".format(li[3]))

if __name__=="__main__":
    main()

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

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

def main():
    N, *S = read().split() 
    
    d = Counter(S)
    for result in ['AC','WA','TLE','RE']:
        if result in d:
            print(f"{result} x {d[result]}")
        else:
            print(f"{result} x 0")


if __name__ == "__main__":
    main()

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

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

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

for judge in judges:
    count = len([x for x in S if x == judge])
    print('{} x {}'.format(judge, count))

Solution (Python):
ac = 0
wa = 0
tle = 0
re = 0
for _ 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 {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))

Solution (Python):
from collections import defaultdict

N = int(input())
dic = defaultdict(int)
for i in range(N):
    dic[input()] += 1
keys = ["AC", "WA", "TLE", "RE"]
for k in keys:
    print(k, "x", dic[k])

Solution (Python):
N = int(input())
nAC = 0
nWA = 0
nTLE = 0
nRE = 0
for i in range(N):
  S = input()
  if S == "AC":
    nAC += 1
  if S == "WA":
    nWA += 1
  if S == "TLE":
    nTLE += 1
  if S == "RE":
    nRE += 1
print("AC x %d" % nAC)
print("WA x %d" % nWA)
print("TLE x %d" % nTLE)
print("RE x %d" % nRE)

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
    if(x=="TLE"):
        TLE+=1
    if(x=="RE"):
        RE+=1
print("AC x",AC)
print("WA x",WA)
print("TLE x",TLE)
print("RE x",RE)

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

for i in range(n):
    w = input()
    d_count[w] = d_count[w] + 1

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

Solution (Python):
n = int(input())
s = [input() for i in range(n)]
c0 = s.count("AC")
c1 = s.count("WA")
c2 = s.count("TLE")
c3 = s.count("RE")
print(f"AC x {c0}")
print(f"WA x {c1}")
print(f"TLE x {c2}")
print(f"RE x {c3}")

Solution (Python):
import math
import collections


def main():
  N = int(input())
  S = [input() for _ in range(N)]
  
  A = collections.Counter(S)
  
  
  print('AC x ' + str(A['AC']))
  print('WA x ' + str(A['WA']))
  print('TLE x ' + str(A['TLE']))
  print('RE x ' + str(A['RE']))
  
  
  
main()

Solution (Python):


n = int(input())

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

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


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

Solution (Python):
import sys
from collections import Counter

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prn = lambda x: print(*x, sep='\n')

def solve():
    n = ni()
    l = [ns() for _ in range(n)]
    d = Counter(l)
    for x in ['AC', 'WA', 'TLE', 'RE']:
        print(x, 'x', d.get(x, 0))
    return

solve()

Solution (Python):
n = int(input())
S = [input() for _ in range(n)]
ans = [0] * 4
l = ["AC","WA","TLE","RE"]
for s in S:
    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):
    print("{}  x {}".format(l[i],ans[i]))

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
from collections import Counter
def input(): return sys.stdin.readline().rstrip()

def main():
    list = []
    for _ in range(0, int(input())):
        list.append(input())
    counter = Counter(list)

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

if __name__ == '__main__':
    main()

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

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

for i in range(num):
  word = input()
  if word == "AC":
    ac += 1
  if word == "TLE":
    tle += 1
  if word == "WA":
    wa += 1
  if word == "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())
a = 0
b = 0
c = 0
d = 0
for i in range(n):
  s = input()
  if s == "AC":
    a = a + 1
  elif s == "WA":
    b = b + 1
  elif s == "TLE":
    c = c + 1
  else:
    d = d + 1
print("AC x " + str(a))
print("WA x " + str(b))
print("TLE x " + str(c))
print("RE x " + str(d))

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

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

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

Solution (Python):
from collections import defaultdict as dc
d=dc(lambda:0)
st=['AC','WA','TLE','RE']
for n in range(int(input())):
    s=input()
    d[s]+=1
for n in st:
	print(n,'x',d[n])

Solution (Python):
import collections


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

C = collections.Counter(S)

WL = ['AC','WA','TLE','RE'] 
for s in WL:
    print(s + ' x ' + str(C[s]))

Solution (Python):


import copy
import random
import bisect 
import fractions 
import math
import sys
import collections
from decimal import Decimal 

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

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))
"""
N = int(input())
S = [0 for i in range(N)]
ans = {
    "AC":0,
    "WA":0,
    "TLE":0,
    "RE":0
}
for i in range(N):
    S[i] = str(input())
    ans[S[i]] += 1

for key in ans.keys():
    print(key + " x " + str(ans[key]))
"""
N = int(input())
S = []
for i in range(N):
    S.append(str(input()))

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

for key in cnt.keys():
    print("{} x {}".format(key, cnt[key]))

Solution (Python):
from collections import Counter
from sys import stdin
N = int(stdin.readline().rstrip())
S = Counter([stdin.readline().rstrip() for _ in range(N)])
for s in ['AC', 'WA', 'TLE', 'RE']:
    print(s + ' x ' + str(S[s]))

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

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

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

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

for s 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 ' + str(ans[0]))
print('WA x ' + str(ans[1]))
print('TLE x '+ str(ans[2]))
print('RE x ' + str(ans[3]))

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

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

for i in ['AC', 'WA', 'TLE', 'RE']:
    print('{} x {}'.format(i, s.count(i)))

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

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


for _ in range(0,n):
  x=input()
  if x=="AC":
    a+=1
  elif x=="WA":
    w+=1
  elif x=="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 _ in range(N)]

for j in ['AC', 'WA', 'TLE', 'RE']:
	print(f'{j} x {S.count(j)}')

Solution (Python):
N = int(input())
dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(N):
    curr = input()
    dic[curr] += 1

for i in dic.keys():
    print("{} x {}".format(i, dic[i]))

Solution (Python):
N = int(input())
import numpy as np
results = np.array([0,0,0,0])
for i in range(N):
  result = input()
  if result == 'AC':
    results[0]=results[0]+1
  elif result == 'WA':
    results[1]=results[1]+1
  elif result == 'TLE':
    results[2]=results[2]+1
  elif result == 'RE':
    results[3]=results[3]+1
print("AC x "+str(results[0]))
print("WA x "+str(results[1]))
print("TLE x "+str(results[2]))
print("RE x "+str(results[3]))

Solution (Python):

n = int(input())
ln ={'AC': 0,'WA': 0,'TLE': 0,'RE': 0}  
for i in range(n):
    s = input()
    ln[s] += 1
for i,j in ln.items():
    print(i +' x ' + str(j))

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