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

    def __init__(self,b):
        b.sort()
        self.b = b

    def sum(self):
        c = [0] *4
        for i in range(len(self.b)):
            if(self.b[i] == "AC"):
                c[0] += 1
            else:
                if(self.b[i] == "TLE"):
                    c[1] += 1
                else:
                    if(self.b[i] == "WA"):
                        c[2] += 1
                    else:
                        c[3] += 1



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


a = int(input())
b =[]
for i in range(a):
    b.append(input())

ans = kazoe(b)
ans.sum()

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

for key in n_apperances:
    print('{} x {}'.format(key, n_apperances[key]))

Solution (Python):
from collections import Counter
 
a = int(input())
b = [input() for _ in range(a)]
for v in ["AC", "WA", "TLE", "RE"]:
  print(f"{v} x {b.count(v)}")

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

Solution (Python):



n = int(input())
_ac = 0
_wa = 0
_tle = 0
_re = 0

for _ in range(n):
    word = input()
    if word in 'AC':
        _ac += 1
        continue
    elif word in 'WA':
        _wa += 1
        continue
    elif word in 'TLE':
        _tle += 1
        continue
    elif word in 'RE':
        _re += 1
        continue


print('AC x ' + str(_ac))
print('WA x ' + str(_wa))
print('TLE x ' + str(_tle))
print('RE x ' + str(_re))

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

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

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

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

ac, wa, tle, re = 0, 0, 0, 0
for i in range(N):
    tmp = input()
    if tmp == "AC":
        ac += 1
    elif tmp == "WA":
        wa += 1
    elif tmp == "TLE":
        tle += 1
    elif tmp == "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):
num = int(input())
count = {"AC":0, "WA":0, "TLE":0, "RE":0}
 
for i in range(num):
  word = input()
  for (key , n) in count.items():
    if word == key:
      count[key] += 1
 
for (key , n) in count.items():
  print(key + " x " + str(n))

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

ACcount=0
WAcount=0
TLEcount=0
REcount=0

for i in range(N):
    s = input()
    if s == "AC":
        ACcount = ACcount + 1
    elif s == "WA":
        WAcount = WAcount + 1
    elif s == "TLE":
        TLEcount = TLEcount + 1
    elif s == "RE":
        REcount = REcount + 1

print("AC x " + str(ACcount))
print("WA x " + str(WAcount))
print("TLE x " + str(TLEcount))
print("RE x " + str(REcount))

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

Solution (Python):
from collections import Counter
n = int(input())
judges = [input() for _ in range(n)]
c_judges = Counter(judges)
print('AC x ' + str(c_judges['AC']))
print('WA x ' + str(c_judges['WA']))
print('TLE x ' + str(c_judges['TLE']))
print('RE x ' + str(c_judges['RE']))

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

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

for i in range(s):
  word = input()
  list[word]+=1

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

Solution (Python):
from collections import Counter

def main():
    n = int(input())
    list_ = []
    for i in range(n):
        list_.append(input())
    cnt = Counter(list_)

    labals = ['AC', 'WA', 'TLE', 'RE']
    for label in labals:
        print(f'{label} x {cnt[label]}')

    
    
    
    



if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import math

def main():

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

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

    for key in mp.keys():
        print(key, "x", mp[key])
main()

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

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

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

cases = int(input())
account = {'AC': 0, 'WA' : 0, 'TLE':0, 'RE':0}

while cases > 0:
  account[input().split()[0]] += 1
  cases -= 1
  
print('AC x '+ str(account['AC']))
print('WA x '+ str(account['WA']))
print('TLE x '+ str(account['TLE']))
print('RE x '+ str(account['RE']))

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

c0 = s.count('AC')
c1 = s.count('WA')
c2 = s.count('TLE')
c3 = s.count('RE')

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

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

Solution (Python):
n=int(input())
rst=['AC','WA','TLE','RE']
cnt=[0,0,0,0]
for i in range(0,n):
    a=input()
    for j in range(0,4):
        if a==rst[j]:
            cnt[j]=cnt[j]+1
            break

for i in range(0,4):
    print(rst[i]," x ",cnt[i])

Solution (Python):
com = ['AC','WA','TLE','RE']
cnt = [0, 0, 0, 0]
n = int(input(''))
for i in range(n):
    s = input('')
    for j in range(4):
        if s == com[j]:
            cnt[j] += 1

for i in range(4):
    print(com[i] + ' x ' + str(cnt[i]))

Solution (Python):
MB_AC = 0
MB_WA = 0
MB_TLE = 0
MB_RE = 0
n = int(input())
for i in range (n):
    ch = input ()
    if (ch =="AC") :
     MB_TLE += 1
    if (ch =="WA") :
     MB_WA += 1
    if (ch =="TLE") : 
     MB_RE += 1
    if (ch =="RE") :
     MB_AC += 1
print('AC x ',MB_TLE)
print('WA x ',MB_WA)
print('TLE x ',MB_RE)
print('RE x ',MB_AC)

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(f"AC x {ac}")
print(f"WA x {wa}")
print(f"TLE x {tle}")
print(f"RE x {re}")

Solution (Python):
n = int(input())
ac_count = 0
wa_count = 0
tle_count = 0
re_count = 0
for i in range(n):
    s = input()
    if s == 'AC':
        ac_count += 1
    elif s == 'WA':
        wa_count += 1
    elif s == 'TLE':
        tle_count += 1
    elif s == 'RE':
        re_count += 1
    else:
        continue

print('AC x ' + str(ac_count))
print('WA x ' + str(wa_count))
print('TLE x ' + str(tle_count))
print('RE x ' + str(re_count))

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

x = []

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

AC = x.count('AC')
WA = x.count('WA')
TLE = x.count('TLE')
RE = x.count('RE')

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

Solution (Python):
N = int(input())
S = []
for i 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):
from collections import defaultdict

def b173(n, slist):

    countdict = defaultdict(int)

    for s in slist:
        countdict[s] += 1

    return countdict

def main():
    tlist = ["AC", "WA", "TLE", "RE"]
    n = int(input())
    slist = [str(input())for i in range(n)]
    countdict = b173(n, slist)

    for t in tlist:
        print(t + " x " + str(countdict.get(t, 0)))

if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
a=0
w=0
t=0
r=0
for _ in range(n):
    s=input()
    if s[0]=="A":
        a+=1
    elif s[0]=="W":
        w+=1
    elif s[0]=="T":
        t+=1
    elif s[0]=="R":
        r+=1
print("AC x",a)
print("WA x",w)
print("TLE x",t)
print("RE x",r)

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

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

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

Solution (Python):
c0,c1,c2,c3 = 0,0,0,0
res = {"AC":c0, "WA":c1, "TLE":c2, "RE":c3}
n = int(input())
for i in range(n):
    s = input()
    res[s] += 1
for key,val in res.items():
    print(key+" x "+str(val))

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

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):
N = int(input())
S = [input() for _ in range(N)]
ac,wa,tle,re=0,0,0,0
for i in range(len(S)):
  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())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 += 1
 
    elif Si == 'WA':
        C1  += 1
 
    elif Si == '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())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 = C0+1
 
    elif Si == 'WA':
        C1  =C1+1
 
    elif Si == 'TLE':
        C2  =C2+1
 
    else:
        C3  =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())
s = [input() for _ in range(n)]
ac = s.count("AC")
wa = s.count("WA")
tle = s.count("TLE")
re = s.count("RE")
print(f"AC x {ac}")
print(f"WA x {wa}")
print(f"TLE x {tle}")
print(f"RE x {re}")

Solution (Python):
n = int(input())
l=[]
for i in range(n):
    l.append(input())
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):
t = int(input())
d = {'AC':0, 'WA':0,'TLE':0, 'RE':0}

while t:
  d[input()]+=1
  
  t-=1
  
for i in d:
  print(i,'x',d[i])

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

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

c_ac = 0
c_wa = 0
c_tle = 0
c_re = 0
for e in lst:
  if e == 'AC':
    c_ac += 1
  elif e == 'WA':
    c_wa += 1
  elif e == 'TLE':
    c_tle += 1
  elif e == 'RE':
    c_re += 1
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):
    Si = input()
    if Si == 'AC':
        C0 = C0+1
 
    elif Si == 'WA':
        C1  =C1+1
 
    elif Si == 'TLE':
        C2  =C2+1
 
    else:
        C3  =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())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 += 1
 
    elif Si == 'WA':
        C1  += 1
 
    elif Si == '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())
s = []
AC = 0
WA = 0
TLE = 0
RE = 0
s = [input() for i in range(n)]
for j in range(n):
    if s[j]=="AC":
        AC = AC +1
    elif s[j]=="WA":
        WA = WA + 1
    elif s[j]=="TLE":
        TLE = TLE + 1
    else:
        RE = RE+1
print("AC x ",AC )
print("WA x ",WA )
print("TLE x ",TLE )
print("RE x ",RE )

Solution (Python):
N = int(input())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 += 1

    elif Si == 'WA':
        C1  += 1

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

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

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

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

ac_count = 0
wa_count = 0
tle_count = 0
re_count = 0

for i in range(0, n):
  s = input()
  if s == 'AC':
    ac_count += 1
  elif s == 'WA':
    wa_count += 1
  elif s == 'TLE':
    tle_count += 1
  else:
    re_count += 1

print('AC x ' + str(ac_count))
print('WA x ' + str(wa_count))
print('TLE x ' + str(tle_count))
print('RE x ' + str(re_count))

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

Solution (Python):
counter = {}
judge = ['AC', 'WA', 'TLE', 'RE']
for c in judge:
    counter[c] = 0

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

for c in judge:
    print('%s x %d' % (c, counter[c]))

Solution (Python):
import time
startTimeProblem=time.time()

import fileinput, sys, itertools, functools
from math import *
from bisect import *
from heapq import *
from collections import *

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

class InputHelper:
    def __init__(self):
        self.myinput = fileinput.input()

    def isLocal(self):
        return not fileinput.isstdin()

    def int(self):
        return int(self.myinput.readline().rstrip())

    def ints(self):
        return [int(_) for _ in self.myinput.readline().rstrip().split()]

    def str(self):
        return self.myinput.readline().rstrip()

    def strs(self):
        return [_ for _ in self.myinput.readline().rstrip().split()]

class OutputHelper:
    def int(self, a):
        print(a)    

    def ints(self, a):  
        print(" ".join([str(_) for _ in a]))
    
    def intsNL(self, a):
        for _ in a:
            print(_)
    
    def str(self, s):
        print(s)

    def strs(self, s):
        print(" ".join([_ for _ in s]))

    def strsNL(self, s):
        for st in s:
            print(st)

class ListNode:
    def __init__(self, val):
        self.val = val
        self.next = None
        self.prev = None

In = InputHelper()
Out = OutputHelper()



N = In.int()

there = ["AC", "WA", "TLE", "RE"]
counts = defaultdict(int)
for _ in range(N):
    s = In.str()

    counts[s]+=1

for t in there:
    Out.str(t + " x "+str(counts[t]))




if len(sys.argv)>2 and sys.argv[2]=="TIMEIT":
    fin = (time.time()-startTimeProblem)*1000
    print("{:.2f}".format(fin) + "ms")

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

a = dict(collections.Counter(lst))

try:
	print('AC x '+str(a['AC']))
except :
	print('AC x 0')
try:
	print('WA x '+str(a['WA']))
except :
	print('WA x 0')
try:
	print('TLE x '+str(a['TLE']))
except:
	print('TLE x 0')
try:
	print('RE x '+str(a['RE']))
except :
	print('RE x 0')

Solution (Python):
N = int(input())
i = 0
dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
while i < N:
    string = input()
    dic[string] += 1
    i += 1

for key in dic:
    print('{} x {}'.format(key, dic[key]))

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

for x in lis:
  dic[x] += 1

for y in dic.keys():
  print(y, "x", dic[y])

Solution (Python):
ans = {'AC':0,'WA':0,'TLE':0,'RE':0}
for _  in range(int(input())):
  ans[input()] += 1
for k in ans:
  print("%s x %d"%(k,ans[k]))

Solution (Python):


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

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


for j in range(N):
    if stringList[j] == 'AC':
        c0 = c0 + 1
    if stringList[j] == 'WA':
        c1 = c1 + 1
    if stringList[j] == 'TLE':
        c2 = c2 + 1
    if stringList[j] == 'RE':
        c3 = 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())
S = []

for i in range(n):
    s = input()
    S.append(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):
N = int(input())
S = []
for i in range(N):
    S.append((input()))

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


ans = 'AC x'+' '+ ac + "\n"+'WA x'+' '+ wa + "\n"+'TLE x' +' '+ tle +"\n" + 'RE x'+' '+re

print(ans)

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

c_0 = 0
c_1 = 0
c_2 = 0
c_3 = 0

for string in list:
  if string == 'AC':
    c_0 += 1
  elif string == 'WA':
    c_1 += 1
  elif string == 'TLE':
    c_2 += 1
  elif string == '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())
X = []
for i in range(N):
    X.append(input())

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

for s in X:
    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())
word_dict = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
  word = str(input())
  if word in word_dict:
    word_dict[word] += 1
  else:
    word_dict[word] = 1
for k, v in word_dict.items():
  print(k, 'x', v)

Solution (Python):
n=int(input())
c0,c1,c2,c3=0,0,0,0

for i in range (n):
    s=input()
    if(s=='AC'):
        c0=c0+1
    if (s=='WA'):
        c1+=1
    if(s=='TLE'):
        c2+=1
    if(s=='RE'):
        c3+=1
print("AC x ",c0)
print("\nWA x ",c1)
print("\nTLE x ",c2)
print("\nRE x ",c3)

Solution (Python):
import sys
import 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


def main():
    N = INT()
    judge = {"AC":0, "WA" : 0, "TLE" : 0, "RE" : 0}
    for _ in range(N):
        s = input()
        judge[s] += 1
    
    for x, y in judge.items():
        print(x, "x", y)


if __name__ == '__main__':
    main()

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

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

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

for result,count in results.items():
    print(result,'x',count)

Solution (Python):
a = int(input())
list1 = []
dict1 = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0,}
for x in range(a):
    b = input()
    list1.append(b)

for x in list1:
    dict1[x] += 1

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

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 s,k in d.items():
  print(s, "x", k)

Solution (Python):
from collections import Counter
n = int(input())
c = Counter()
for _ in range(n):
    c.update([input()])
for k in ["AC","WA","TLE","RE"]:
    print(f"{k} x {c[k]}")

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

words = ['AC', 'WA', 'TLE', 'RE']
ls = [0]*4

for i in range(n) :
    s = input()
    if s in words :
        ls[words.index(s)] += 1

for j in range(4) :
    print(words[j]+' x '+str(ls[j]))

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

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

n = int(input())
for i in range(n):
  t = str(input()).upper()
  if t == "AC":
    AC += 1
  
  if t == "WA":
    WA += 1
  
  if t == "TLE":
    TLE += 1
  
  if t == "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 i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0
for ss in s:
    if ss == 'AC':
        ac+=1
    elif ss == 'WA':
        wa+=1
    elif ss == 'TLE':
        tle+=1
    elif ss == '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=[0,0,0,0]
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())
a1 = []
for i in range(N):
  a1.append(input())

a2 = ["AC", "WA", "TLE", "RE"]
for i in a2:
  print(i + " x " + str(a1.count(i)))

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

Solution (Python):

ans = {"AC": 0, "WA": 0, "TLE": 0, "RE":0}
N = int(input())
for i in range(N):
  inpt = input()
  if(inpt == "AC"):
    ans["AC"] += 1
  elif(inpt == "WA"):
    ans["WA"] += 1
  elif(inpt == "TLE"):
    ans["TLE"] += 1
  else:
    ans["RE"] += 1
for key, value in ans.items():
  print("{0} x {1}".format(key, value))

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

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

for key, value in ANS.items():
    print("{0} x {1}".format(key, value))

Solution (Python):
N = int(input())
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0


for i in range(N):
    x = input()
    if x == "AC":
        count_AC += 1
    elif x == "WA":
        count_WA += 1
    elif x == "TLE":
        count_TLE += 1
    elif x ==  "RE":
        count_RE += 1

print("AC", "x", count_AC)
print("WA", "x", count_WA)
print("TLE", "x", count_TLE)
print("RE", "x", count_RE)

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

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

S=[]

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


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

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 {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

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

numac = judgement.count("AC")
print(f'AC x {numac}')
numwa = judgement.count("WA")
print(f'WA x {numwa}')
numtle = judgement.count("TLE")
print(f'TLE x {numtle}')
numre = judgement.count("RE")
print(f'RE x {numre}')

Solution (Python):
n=int(input())
lis=['AC', 'WA', 'TLE', 'RE']
ans=[0,0,0,0]
for _ in range(n):
    s=input()
    ans[lis.index(s)]+=1

for i in range(4):
    print(lis[i]+' x '+str(ans[i]))

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

moto=['AC','WA','TLE','RE']
suum=[]
for i in moto:
    moji=LI.count(i)
    suum.append(moji)

for i in range(4):
    print('{} x {}'.format(moto[i],suum[i]))

Solution (Python):
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]
counter = Counter(s)
output = ['AC','WA','TLE','RE']

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

Solution (Python):
d = {}
for _n in range(int(input())):
  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):
a=int(input())
p=[0 for i  in range(4)]
for i  in range(a):
    t=input()
    if  t=="AC":
        p[0]+=1
    elif t=="WA":
        p[1]+=1
    elif t=="TLE":
        p[2]+=1
    else:
        p[3]+=1

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

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

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

for t in  testcase:
    if t == "AC":
        AC += 1
    elif t == "WA":
        WA += 1
    elif t == "TLE":
        TLE += 1
    elif t == "RE":
        RE += 1
    else:
        continue
        
print("AC x "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

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

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

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

count = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(N):
	s = input()
	count[s] += 1
	
for key, item in count.items():
	print('{} x {}'.format(key, item))

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

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

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

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

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

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
  elif A == 'WA':
    WA += 1
  elif A == 'TLE':
    TLE += 1
  elif A == 'RE':
    RE += 1

print(f'''AC x {AC}''')
print(f'''WA x {WA}''')
print(f'''TLE x {TLE}''')
print(f'''RE x {RE}''')

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

ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
  data = input().rstrip()
  if data == 'AC':
    ac += 1
  elif data == 'WA':
    wa += 1
  elif data == 'TLE':
    tle += 1
  elif data == '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 i in range(n)]
c = [0] * 4

for i in range(n):
    if s[i] == "AC":
        c[0] += 1
        
    elif s[i] == "WA":
        c[1] += 1
        
    elif s[i] == "TLE":
        c[2] += 1
        
    elif s[i] == "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):
ac=0;wa=0;re=0;tle=0
for _ in range(int(input())):
    n=input()
    if n=='AC': ac+=1
    elif n=='WA': wa+=1
    elif n=='TLE': tle+=1
    else: re+=1
print(f"AC x {ac}")
print(f"WA x {wa}")
print(f"TLE x {tle}")
print(f"RE x {re}")

Solution (Python):
import collections

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

AC_count = S.count("AC")
WA_count = S.count("WA")
TLE_count = S.count("TLE")
RE_count = S.count("RE")

print(f"AC x {AC_count}")
print(f"WA x {WA_count}")
print(f"TLE x {TLE_count}")
print(f"RE x {RE_count}")

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

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

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