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

Solution (Python):
def task():
    i=int(input())
    ac=0
    tle=0
    wa=0
    re=0
    while(i):
        i-=1
        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)
def default():
    t=1
    while(t):
        t-=1
        task()
if(__name__=="__main__"):
    default()

Solution (Python):
n = int(input())
c = [0]*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], end='')

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

Solution (Python):
n=int(input())
lst=[]
for i in range(n):
	s=input()
	lst.append(s)
from collections import Counter
lst=Counter(lst)
print("AC","x",lst["AC"])
print("WA","x",lst["WA"])
print("TLE","x",lst["TLE"])
print("RE","x",lst["RE"])

Solution (Python):
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
    a = input()
    if a == "AC":
        ac +=1
    elif a == "WA":
        wa +=1
    elif a == "TLE":
        tle +=1
    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):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))
ZIP = lambda: zip(*(MAP() for _ in range(n)))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    N = INT()
    S = [INPUT() for _ in range(N)]

    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__':
    main()

Solution (Python):
n = int(input())
d = {'AC':0,'WA':1, 'TLE':2, 'RE':3}
a = ['AC x', 'WA x', 'TLE x', 'RE x']
ans_list = [0]*4
for _ in range(n):
    s = input()
    ans_list[d[s]]+=1
[print(a[i],ans_list[i]) for i in range(4)]

Solution (Python):
n = int(input())
s = [input() for _ in range(n)]
ac = s.count('AC')
print('AC x '+str(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)]
j = ['AC', 'WA', 'TLE', 'RE']
l = [0]*len(j)
for i in s:
    for m in range(len(j)):
        if i == j[m]:
            l[m] += 1
            
for i in range(len(j)):
    print(j[i] + ' x ' + str(l[i]))

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

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

Solution (Python):
import math
import bisect
import copy





l=[]
for i in range(int(input())):
	l.append(input())
d={}
d['AC']=0

d['WA']=0
d['TLE']=0
d['RE']=0
for i in range(len(l)):
	d[l[i]]+=1
for u,v in d.items():
	print(u,'x',v)

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

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

Solution (Python):
n=int(input())
s=[]
for i 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
    elif s[i]=='WA':
        wa+=1  
    elif s[i]=='TLE':
        tle+=1
    else:
        re+=1

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

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

Ans = [0] * 4

for i in range(N):
  if S[i] == 'AC':
    Ans[0] = Ans[0] + 1
  elif S[i] == 'WA':
    Ans[1] = Ans[1] + 1
  elif S[i] == 'TLE':
    Ans[2] = Ans[2] + 1
  elif S[i] == '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):



def main():
    n = int(input())
    string_list = [input() for i in range(n)]
    c1, c2, c3, c4 = 0, 0, 0, 0
    for s in string_list:
        if s == "AC":
            c1 += 1
        elif s == "WA":
            c2 += 1
        elif s == "TLE":
            c3 += 1
        elif s == "RE":
            c4 += 1
    print(f"AC x {c1}")
    print(f"WA x {c2}")
    print(f"TLE x {c3}")
    print(f"RE x {c4}")


if __name__ == "__main__":
    main()

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

AC=0
WA=0
TLE=0
RE=0
for i in range(x):
    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 = {}
for _ in range(n):
    k = input()
    if k not in S: S[k] = 0
    S[k] += 1



for k in ['AC','WA','TLE','RE']:
    
    if k not in S: print(k, 'x', 0)
    else: print(k, 'x', S[k])

Solution (Python):
n = int(input())
d = {"AC":0, "WA":0, "TLE":0, "RE":0}
for i in range(n):
    s = 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):
def main():
    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))
if __name__ == "__main__":
    main()

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

    
if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

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

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

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())
a=0
w=0
t=0
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
print("AC x "+str(a))
print("WA x "+str(w))
print("TLE x "+str(t))
print("RE x "+str(r))

Solution (Python):
list=[]
for i in range(int(input())):
    list.append(input())
AC,WA,TLE,RE=0,0,0,0
for a in list:
    if a=="AC":
        AC+=1
    elif a=="WA":
        WA+=1
    elif a=="TLE":
        TLE+=1
    elif a=="RE":
        RE+=1
print("AC","x",AC)
print("WA","x",WA)
print("TLE","x",TLE)
print("RE","x",RE)

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = int(readline())
s = [readline().decode().rstrip() for _ in range(n)]
"".join(s)
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 itertools
import decimal
import math
import collections
import sys
input = sys.stdin.readline










def resolve():
    N=int(input())
    AC=0
    WA=0
    TLE=0
    RE=0
    for i in range(N):
        S=input().strip()
        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))
    


resolve()

Solution (Python):
n=int(input())
list=[input() for i in range(n)]
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(0,n):
    if list[i] == 'AC':
        AC = AC + 1
    if list[i] == 'WA':
        WA = WA + 1
    if list[i] == 'TLE':
        TLE = TLE + 1
    if list[i] == 'RE':
        RE = RE + 1
print("AC x " + str(AC))
print("WA x " + str(WA))
print("TLE x " + str(TLE))
print("RE x " + str(RE))

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

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

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

Solution (Python):
judge =["AC","WA","TLE","RE"]
C = [0,0,0,0]

N= int(input())
for i in range(N):
    si = input()
    if si == judge[0]:
        C[0]+=1
    elif si == judge[1]:
        C[1]+=1
    elif si == judge[2]:
        C[2]+=1
    elif si == judge[3]:
        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())
results = [0,0,0,0]
for i in range(N):
    result = input()
    if result[0]=="A":
        results[0]+=1
    elif result[0]=="W":
        results[1]+=1
    elif result[0]=="T":
        results[2]+=1
    elif result[0]=="R":
        results[3]+=1
print("AC x ",results[0],"\n","WA x ",results[1],"\n","TLE x ",results[2],"\n","RE x ",results[3])

Solution (Python):
N = int(input())
x = [input() for i in range(N)]
AC = 0
WA = 0
TLE = 0
RE = 0
j = 0
while j < N :
  if x[j] == "AC":
    AC += 1
  if x[j] == "WA":
    WA += 1
  if x[j] == "TLE":
    TLE += 1
  if x[j] == "RE":
    RE += 1
  j += 1
  
print("AC x " + str(AC))
print("WA x " + str(WA))
print("TLE x " + str(TLE))
print("RE x " + str(RE))

Solution (Python):

import datetime
from decimal import Decimal, ROUND_DOWN
import heapq
from fractions import gcd
from functools import reduce
from collections import deque

import itertools
import collections
import math
import sys
sys.setrecursionlimit(2000000)







n = int(input())










s = []
for i in range(n):
    s.append(input())
s_count = collections.Counter(s)


if 'AC' in s_count:
    print('AC x '+str(s_count['AC']))
else:
    print('AC x 0')

if 'WA' in s_count:
    print('WA x '+str(s_count['WA']))
else:
    print('WA x 0')

if 'TLE' in s_count:
    print('TLE x '+str(s_count['TLE']))
else:
    print('TLE x 0')

if 'RE' in s_count:
    print('RE x '+str(s_count['RE']))
else:
    print('RE x 0')

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

Solution (Python):
N = int(input())
judge = ["AC", "WA" , "TLE", "RE"]
res = [0, 0, 0, 0]
for i in range(N):
  s = input()
  if s == judge[0]:
    res[0] += 1
  elif s == judge[1]:
    res[1] += 1
  elif s == judge[2]:
    res[2] += 1
  elif s == judge[3]:
    res[3] += 1
print("AC x {}".format(res[0]))
print("WA x {}".format(res[1]))
print("TLE x {}".format(res[2]))
print("RE x {}".format(res[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):
def main():
    n = int(input())
    s = []
    for i in range(n):
        s.append(input())

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

    c0 = res['AC']
    c1 = res['WA']
    c2 = res['TLE']
    c3 = res['RE']

    print('AC x {}'.format(c0))
    print('WA x {}'.format(c1))
    print('TLE x {}'.format(c2))
    print('RE x {}'.format(c3))
    

if __name__ == '__main__':
    main()

Solution (Python):
a = 0
w = 0
t = 0
r = 0
n = int(input())
for i in range(n):
    s = str(input())
    if s == 'AC':
        a = a + 1
    elif s == 'WA':
        w = w + 1
    elif s == 'TLE':
        t = t + 1
    elif s == 'RE':
        r = 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)]
A=s.count("AC")
B=s.count("WA")
C=s.count("TLE")
D=N-(A+B+C)
print("AC x",A)
print("WA x",B)
print("TLE x",C)
print("RE x",D)

Solution (Python):

AC = 0
WA = 0
TLE = 0
RE = 0
N = int(input())
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):
from sys import stdin
input = stdin.readline


def main():
  N = int(input())
  
  
  AC = 0
  WA = 0
  TLE = 0
  RE = 0
  for i in range(N):
    j = input()[:-1]
    if j == 'AC':
      AC += 1
    elif j == 'WA':
      WA += 1
    elif j == 'TLE':
      TLE += 1
    elif j == 'RE':
      RE += 1

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


if(__name__ == '__main__'):
  main()

Solution (Python):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M


n=int(input())
D=[0]*4
for i in  range(n):
    s=input()
    if s=="AC":
        D[0]+=1
    elif s=="WA":
        D[1]+=1
    elif s=="TLE":
        D[2]+=1
    else:
        D[3]+=1
print("AC x",D[0])
print("WA x",D[1])
print("TLE x",D[2])
print("RE x",D[3])

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

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

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

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

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

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    N = int(input())
    dic = {"AC": 0, "WA":0, "TLE": 0, "RE": 0}
    for _ in range(N):
        S = input().rstrip('\n')
        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"]))



if __name__ == '__main__':
    main()

Solution (Python):

import sys
input = sys.stdin.readline

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


n = I()
a = 0
b = 0
c = 0
d = 0

for i in range(n):
    temp = input().rstrip()
    if temp == "AC":
        a+=1
    elif temp == "WA":
        b+=1
    elif temp == "TLE":
        c+=1
    elif temp == "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):

"""AtCoder Beginner Contest 173: B - 
https://atcoder.jp/contests/abc173/tasks/abc173_b
"""


def main():
    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']))


if __name__ == '__main__':
    main()

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

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

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

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

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

Solution (Python):
from collections import Counter
t=int(input())
l=[]
for i in range(t):
    l.append(input())
z=Counter(l)
print("AC x "+str(z["AC"]))
print("WA x "+str(z["WA"]))
print("TLE x "+str(z["TLE"]))
print("RE x "+str(z["RE"]))

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

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

for i in range(N):
    if s[i] == 'AC':
        m[0] += 1
    if s[i] == 'WA':
        m[1] += 1
    if s[i] == 'TLE':
        m[2] += 1
    if s[i] == 'RE':
        m[3] += 1

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

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

Solution (Python):
n=int(input())
a=0
b=0
c=0
d=0
for i in range(n):
  w=input()
  if w=="AC":
    a=a+1
  elif w=="TLE":
    b=b+1
  elif w=="WA":
    c=c+1
  else:
    d=d+1
print("AC "+"x "+str(a))
print("WA "+"x "+str(c))
print("TLE "+"x "+str(b))
print("RE "+"x "+str(d))

Solution (Python):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  temp = input()
  if temp == 'AC':
    AC += 1
  if temp == 'WA':
    WA += 1
  if temp == 'TLE':
    TLE += 1
  if temp == '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())
count = [0] * 4

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

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

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

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

def main():
    N = int(readline())

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

    for _ in range(N):
        s = readline().strip()
        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']}")


if __name__ == "__main__":
    main()

Solution (Python):
a=0
w=0
t=0
r=0
for _ in range(int(input())):
    p=input()
    
    if p=="AC":
        a+=1
    elif p=="TLE":
        t+=1
    elif p=="WA":
        w+=1
    else:
        r+=1
print("AC","x",a) 


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

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

D = {}
D['AC'] = 0
D['WA'] = 0
D['TLE'] = 0
D['RE'] = 0

for k in range(N):
  D[S[k]] += 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())
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):
import sys
import time
import math
from collections import deque
import heapq
import itertools
from decimal import Decimal
import bisect
from operator import itemgetter
MAX_INT = int(10e18)
MIN_INT = -MAX_INT
mod = 1000000000+7
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()
s = [S() for i in range(N)]

d = [0]*4
for i in range(N):
  if s[i] == "AC":
    d[0] += 1
  elif s[i] == "WA":
    d[1] += 1
  elif s[i] == "TLE":
    d[2] += 1
  else:
    d[3] += 1

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

Solution (Python):



from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

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

c = Counter(S)

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

for i in counts:
    print(i + " x " + str(c[i]))

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

A = S.count('AC')
B = S.count('WA')
C = S.count('TLE')
D = S.count('RE')
print('AC x '+str(A))
print('WA x '+str(B))
print('TLE x '+str(C))
print('RE x '+str(D))

Solution (Python):
dic=dict()
n=int(input())
for i in range(n):
    s=input()
    if s in dic:
        dic[s]+=1
    else:
        dic[s]=1
if "AC" in dic:
    print("AC x",dic["AC"])
else:
    print("AC x 0")
if "WA" in dic:
    print("WA x",dic["WA"])
else:
    print("WA x 0")
if "TLE" in dic:
    print("TLE x",dic["TLE"])
else:
    print("TLE x 0")
if "RE" in dic:
    print("RE x",dic["RE"])
else:
    print("RE x 0")

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

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

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

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

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

Solution (Python):
N = int(input())
AC =[]
WA =[]
TLE =[]
RE =[]

for i in range(N):
    s = str(input())
    if s == "AC":
        AC.append(s)
    elif s == "WA":
        WA.append(s)
    elif s == "TLE":
        TLE.append(s)
    elif s =="RE":
        RE.append(s)
print("AC x "+str(len(AC)))
print("WA x "+str(len(WA)))
print("TLE x "+str(len(TLE)))
print("RE x "+str(len(RE)))

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

Solution (Python):
n = int(input())
s = []
a = ["AC","WA","TLE","RE"]

for i in range(n):
    s.append(str(input()))

for i in a:
    print(i + " x " + str(s.count(i)))

Solution (Python):
import collections
N = int(input())
S = [input() for _ in range(N)]
c = collections.Counter(S)
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())
s = [input() for _ in range(n)]

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

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

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

N = int(readline())

ans =[0, 0, 0, 0]

for i in range(N):
  si = readline().strip()
  if si == "AC":
    ans[0] += 1
  elif si == "WA":
    ans[1] += 1
  elif si == "TLE":
    ans[2] += 1
  elif si == "RE":
    ans[3] += 1

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

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


ACcnt = C.count("AC")
WAcnt = C.count("WA")
TLEcnt = C.count("TLE")
REcnt = C.count("RE")

print('AC x ' + str(ACcnt))
print('WA x ' + str(WAcnt))
print('TLE x ' + str(TLEcnt))
print('RE x ' + str(REcnt))

Solution (Python):

def solve():
    N = int(input())
    S = [input() for N in range(N)]
    snames = ["AC", "WA", "TLE", "RE"]
    score = {"AC": 0, "TLE": 0, "WA": 0, "RE": 0}


    for st in S:
        score[st] += 1

    for sname in snames:
        print(sname + " x " + str(score[sname]))

solve()

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

Solution (Python):
N = int(input())
S = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(N):
    s = input()
    S[s] += 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())
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
    else:
        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):
class Counter(dict):
    def __missing__(self, i):
        return 0

n = int(input())

answers = Counter()

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

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

Solution (Python):
from collections import Counter
lst=[]
for i in range(int(input())):
  lst.append(input())
dic=dict(Counter(lst))
for i in ['AC','WA','TLE','RE']:
  try:
    print(f'{i} x {dic[i]}')
  except KeyError:
    print(f'{i} x 0')

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 %s" % ac)
print("WA x %s" % wa)
print("TLE x %s" % tle)
print("RE x %s" % re)

Solution (Python):


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

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

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

for _ in range(N):
    S = input()
    if S == "AC":
        count[0] += 1
    elif S == "WA":
        count[1] += 1
    elif S == "TLE":
        count[2] += 1
    else:
        count[3] += 1

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

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

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

for _ in range(n):
    in_test = input()
    out_set[in_test] += 1

for key in out_set:
    print(f'{key} x {out_set[key]}')

Solution (Python):
tcase=['AC','WA','TLE','RE']
tcount=[0,0,0,0]

n=int(input())
for i in range(n):
    c=input()
    for t in range(4):
        if tcase[t]==c:
            tcount[t]+=1
            break

for i in range(4):
    print(tcase[i],'x',tcount[i])

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