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())
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):
from collections import Counter
cases = ['AC','WA','TLE','RE']

n = int(input())
res = Counter(input().strip() for _ in range(n))

for case in cases:
    print(f"{case} x {res[case]}")

Solution (Python):
FAST_IO = 1
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()

    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())
rrmm = lambda n: [rrm() for _ in xrange(n)]


N = rri()
dic = {}
for i in range(N):
    tye = rr()
    dic[tye] = dic.get(tye, 0)+1
for tye in ("AC", "WA", "TLE", "RE"):
    print("{} x {}".format(tye, dic.get(tye, 0)))
'''
 AC x 3
WA x 1
TLE x 2
RE x 0

'''

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

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

Solution (Python):
n = int(input())
d = dict()
d["AC"] = 0
d["WA"] = 0
d["RE"] = 0
d["TLE"] = 0

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

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

Solution (Python):
N = int(input())
AC, WA, TLE, RE = 0, 0, 0, 0

for i in range(N):
    S = input().strip()
    if S == "AC":
        AC += 1
    elif S == "WA":
        WA += 1
    elif S == "TLE":
        TLE += 1
    elif S == "RE":
        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 collections
N = int(input())

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

c = collections.Counter(s)
d = dict(c)

m = ["AC", "WA", "TLE", "RE"]
for i in m:
    print(i, 'x', d.get(i,0))

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

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

    for s in S:
        if s == 'AC':
            ac += 1
        elif s == 'WA':
            wa += 1
        elif s == 'TLE':
            tle += 1
        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):
N = int(input())
dict = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0, }
for x in range(N):
    result = input()
    dict[result] += 1

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

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

from collections import Counter
count = Counter(ab)

ac = count["AC"]
wa = count["WA"]
tle =count["TLE"]
re = 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())
a1 = 0 
a2 = 0 
a3 = 0 
a4 = 0 

for i in range(N):
  s = input()
  if s == 'AC':
    a1 += 1
  if s == 'WA':
    a2 += 1
  if s == 'TLE':
    a3 += 1
  if s == 'RE':
    a4 += 1

    
print("AC x {}".format(a1))
print("WA x {}".format(a2))
print("TLE x {}".format(a3))
print("RE x {}".format(a4))

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

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

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

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

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

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

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

Solution (Python):


import re
import math
from collections import defaultdict,deque,Counter
from fractions import Fraction
import bisect
import itertools
from itertools import accumulate
from copy import deepcopy
import heapq
import random
import time
import os
import sys
from functools import lru_cache,reduce
readline=sys.stdin.readline
sys.setrecursionlimit(100000)
alp="abcdefghijklmnopqrstuvwxyz"
numbers="0123456789"
mod=int(10**9+7)
inf=int(10**19)
class Set():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(bool)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        if not self.find(x):
            heapq.heappush(self.heap,x)
            self.dic[x]=True
            self.size+=1

    def remove(self,x):
        if self.find(x):
            self.dic[x]=False
            self.size-=1

    def find(self,x):
        return self.dic[x]
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==False:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class multiset():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(int)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        heapq.heappush(self.heap,x)
        self.dic[x]+=1
        self.size+=1

    def remove(self,x):
        if self.dic[x]>0:
            self.dic[x]-=1
            self.size-=1
    
    def count(self,x):
        return self.dic[x]

    def find(self,x):
        return self.dic[x]>0
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==0:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class Edge():
    def __init__(self,x,y,val=1):
        self.x=x
        self.y=y
        self.val=val
class unionfind():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(n)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):
            self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def yn(b):print("yes" if b else "no")
def Yn(b):print("Yes" if b else "No")
def YN(b):print("YES" if b else "NO")
def ispow(a,b):
    now=b
    while now<a:
        now*=b
    return now==a
def getbin(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def getfacs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod_>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def nextcomb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:return num
def getprimes(n):
    if n==0:return []
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    ret=[]
    for a in range(n+1):
        if(A[a]):ret.append(a)
    return ret
def isprime(num):
    if(num<=1):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(b,t,f):return t if b else f
def factorize(n):
    b = 2
    ret=defaultdict(int)
    while b * b <= n:
        while n % b == 0:
            n //= b
            ret[b]+=1
        b+=1
    if n > 1:ret[n]+=1
    return ret
def inputintlist(row=1): 
    if row==1:
        ret=list(map(int,input().split()))
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=int(input())
    return ret
def inputfloatlist(row=1): 
    if row==1:
        ret=list(map(float,input().split()))
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=float(input())
    return ret
def istanchouzouka(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>=a:
            f=False
        prev=a
    return f
def istanchouhigensyou(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>a:
            f=False
        prev=a
    return f
def getallsum(A):
    s=sum(A)
    dp=defaultdict(int)
    dp[0]=1
    for a in range(0,len(A)):
        for b in range(s,-1,-1):
            if b-A[a]>=0:
                dp[b]+=dp[b-A[a]]
    return dp
def yuukoutomukou(edges):
    ret=deepcopy(edges)
    for edge in edges:
        if not edge.x==edge.y:
            ret.append(Edge(edge.y,edge.x,edge.val))
    return ret
def dijkstra(edges,V,start):
    mincost=[inf]*V
    G=[[] for a in range(V)]
    for edge in edges:
        G[edge.x].append([edge.val,edge.y])
    Q=PriorityQueue()
    Q.put([0,start])
    while not Q.empty():
        nowcost,nowx=Q.get()
        if mincost[nowx]==inf:
            mincost[nowx]=nowcost
            for cost,y in G[nowx]:
                newcost=nowcost+cost
                Q.put([newcost,y])
    return mincost
def warshallfloyd(edges,V):
    mincost=[[inf for b in range(V)] for a in range(V)]
    for a in range(V):mincost[a][a]=0
    for edge in edges:
        mincost[edge.x][edge.y]=min(mincost[edge.x][edge.y],edge.val)
    for k in range(V):
        for s in range(V):
            for t in range(V):
                if mincost[s][k]==inf or mincost[k][t]==inf:continue
                mincost[s][t]=min(mincost[s][t],mincost[s][k]+mincost[k][t])
    return mincost
def bellemanford(edges,V,start):
    mincost=[inf]*V
    mincost[start]=0
    for _ in range(V):
        for edge in edges:
            if mincost[edge.x]==inf:continue
            mincost[edge.y]=min(mincost[edge.y],mincost[edge.x]+edge.val)
    return mincost
def getmd(x1,y1,x2,y2):return abs(x1-x2)+abs(y1-y2)
def geted(x1,y1,x2,y2):return math.sqrt((x1-x2)**2+(y1-y2)**2)
class fordfulkerson():
    def __init__(self,edges,V,s,t):
        self.V=V
        self.used=[False]*V
        self.G=[[] for a in range(V)]
        self.s=s
        self.t=t
        for edge in edges:
            self.G[edge.x].append({"x":edge.x,"y":edge.y,"cap":edge.val,"rev":len(self.G[edge.y])})
            self.G[edge.y].append({"x":edge.y,"y":edge.x,"cap":0,"rev":len(self.G[edge.x])-1})
    def dfs(self,v,t,f=inf):
        if v==t:return f
        self.used[v]=True
        for a in range(len(self.G[v])):
            x=self.G[v][a]["x"]
            y=self.G[v][a]["y"]
            cap=self.G[v][a]["cap"]
            rev=self.G[y][self.G[x][a]["rev"]]
            if self.used[y] or cap==0:continue
            f2=self.dfs(y,t,min(f,cap))
            if f2>0:
                self.G[v][a]["cap"]-=f2
                rev["cap"]+=f2
                return f2
        return 0
    def maxflow(self):
        flow=0
        while True:
            self.used=[False]*V
            zouka=self.dfs(self.s,self.t)
            if zouka==0:break
            flow+=zouka
        return flow
def zipsort(*args):
    ziplist=sorted(zip(*args))
    for a in range(len(args)):
        for b in range(len(ziplist)):
            args[a][b]=ziplist[b][a]
def zipreverse(*args):
    ziplist=list(zip(*args))
    rev=[]
    for a in range(len(ziplist)-1,-1,-1):
        rev.append(ziplist[a])
    for a in range(len(args)):
        for b in range(len(rev)):
            args[a][b]=rev[b][a]


n=int(input())
S={}
S["AC"]=0
S["TLE"]=0
S["WA"]=0
S["RE"]=0
for a in range(n):
    S[input()]+=1
print("AC x",S["AC"])
print("WA x",S["WA"])
print("TLE x",S["TLE"])
print("RE x",S["RE"])

Solution (Python):
def main():
    from collections import Counter
    n = int(input())
    s = [input() for _ in range(n)]
    c = Counter(s)
    p = lambda x: print(f'{x} x {c[x]}')
    p('AC')
    p('WA')
    p('TLE')
    p('RE')

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
array = []
for i in range(n):
    array.append(input())
ac = 0
wa =0
tle = 0
re = 0

for s in array:
    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())
l = ["AC","WA","TLE","RE"]
ans = [0,0,0,0]
for i in range(N):
    S = input()
    if(S == "AC"):
        ans[0] += 1
    if(S == "WA"):
        ans[1] += 1
    if(S == "TLE"):
        ans[2] += 1
    if(S == "RE"):
        ans[3] += 1

for i in range(4):
    print(l[i], " x ",ans[i])

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
d = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
    s = ns()
    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):
import collections
n=int(input())
s=[input() for i in range(n)]
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 _ 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):
n = int(input())
s = [input() for _ in range(n)]
count  = [0, 0, 0, 0]
for i in s:
    if i == 'AC':count[0] += 1
    elif i == 'WA':count[1] += 1
    elif i == 'TLE':count[2] += 1
    else:count[-1] += 1

string = ['AC', 'WA', 'TLE', 'RE']
for i,j in zip(string, count):
    print(i, 'x', j)

Solution (Python):
n = int(input())
s = []

for _ in range(n):
  s.append(input())

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

Solution (Python):
import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
n = int(input())




l = [0, 0, 0, 0]

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


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

Solution (Python):

import sys

from sys import stdin
input = lambda: stdin.readline().rstrip()


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

Solution (Python):
N=int(input())
hoge=[0]*4
List=["AC","WA","TLE","RE"]
for i in range(N):
  s=input()
  hoge[List.index(s)]+=1
  
for i in range(4):
  print(List[i]+" x "+str(hoge[i]))

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

for key, val in cnt.items():
    print(key,"x",val)

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

Solution (Python):
from collections import defaultdict
middle = " x "
N = int(input())
dic = defaultdict(int)
for _ in range(N):
  key = input()
  dic[key] += 1

list_key = ["AC", "WA", "TLE", "RE"]
for item in list_key:
  print(item + middle + str(dic[item]))

Solution (Python):
from collections import Counter

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

c = Counter(s)
for res in ('AC', 'WA', 'TLE', 'RE'):
    print(f'{res} x {c[res]}')

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

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

from collections import Counter
sc = Counter(s)

x = ['AC', 'WA', 'TLE', 'RE']
for xx in x:
  print( '{} x {}'.format(xx, sc[xx]) )

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

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

Solution (Python):
def main():
    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
        elif "RE":
            re+=1
    print(f"AC x {ac}")
    print(f"WA x {wa}")
    print(f"TLE x {tle}")
    print(f"RE x {re}")
if __name__ == "__main__":
    main()

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

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

for k,v in d.items():
    print (k, "x", v)

Solution (Python):
n = int(input())
a = 0
b = 0
c = 0
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 " + str(a))
print("WA x " + str(b))
print("TLE x " + str(c))
print("RE x " + str(d))

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

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

for i in range(n):
    a = input()
    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):
ac,tle,wa,re=0,0,0,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):



import sys
sys.setrecursionlimit(10**7)
from pprint import pprint as pp
from pprint import pformat as pf



import math

import bisect


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

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

Solution (Python):
import collections 

n = int(input())
s = [ input() for _ in range(n)]
c = collections.Counter(s)
for case in ['AC', 'WA', 'TLE', 'RE']:
    print(case, 'x', c[case])

Solution (Python):
from collections import defaultdict
n=int(input())
d=defaultdict(int)
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):
N=int(input())
D=[input() for a in range(N)]
print(f"AC x {D.count('AC')}")
print(f"WA x {D.count('WA')}")
print(f"TLE x {D.count('TLE')}")
print(f"RE x {D.count('RE')}")

Solution (Python):
from collections import defaultdict

s = ["AC", "WA", "TLE", "RE"]
n = int(input())
cnt = defaultdict(int)
for i in range(n):
    x = input()
    cnt[x] += 1

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

Solution (Python):

N = int(input())
M = [input() for i in range(N)]
ac=0
wa=0
tle=0
re=0
for i in M:
    if i =="AC":
        ac+=1
    if i =="WA":
        wa+=1
    if i =="TLE":
        tle+=1
    if i =="RE":
        re+=1
print("AC x",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)

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

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

Solution (Python):
n = int(input())
count = [0,0,0,0]
for _ in range(n):
    i = input()
    if i=='AC':
        count[0]+=1
    elif i=='WA':
        count[1]+=1
    elif i=='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):
from collections import Counter

def main():
    n=int(input())
    s=Counter(input() for _ in range(n))
    print("AC x", s["AC"])
    print("WA x", s["WA"])
    print("TLE x", s["TLE"])
    print("RE x", s["RE"])

if __name__ == '__main__':
    main()

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

Solution (Python):
from collections import Counter
def main():
    n = int(input())
    S = Counter()
    for _ in range(n):
        w = input()
        S[w]+=1
    
    A = ["AC","WA","TLE","RE"]
    for a in A:
        print(a+" x "+str(S[a]))
main()

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

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

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

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

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

Solution (Python):
from collections import defaultdict

N = int(input())

result = defaultdict(int)

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

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

for c in kind:
    print(c, "x", str(result[c]))

Solution (Python):
from sys import stdin, stdout

int_in = lambda: int(stdin.readline())
arr_in = lambda: [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for _ in range(rows)]
str_in = lambda: stdin.readline().strip()
out = lambda o: stdout.write("{}\n".format(o))
arr_out = lambda o: out(" ".join(map(str, o)))
bool_out = lambda o: out("YES" if o else "NO")
tests = lambda: range(1, int_in() + 1)
case_out = lambda i, o: out("Case 


if __name__ == "__main__":
    n = int_in()
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for _ in range(n):
        s = str_in()
        if "AC" == s:
            ac += 1
        elif "WA" == s:
            wa += 1
        elif "TLE" == s:
            tle += 1
        elif "RE" == s:
            re += 1
    out("AC x {}".format(ac))
    out("WA x {}".format(wa))
    out("TLE x {}".format(tle))
    out("RE x {}".format(re))

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

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

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

Solution (Python):
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
sl = [S() for _ in range(N)]

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

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

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

Solution (Python):






def main():
    N = int(input())
    AC, WA, TLE, RE = 0,0,0,0
    for _ in range(N):
        i = input()
        if i == 'AC':
            AC += 1
        elif i == 'WA':
            WA += 1
        elif i == 'TLE':
            TLE += 1
        elif i == 'RE':
            RE += 1
    
    print('AC x ' + str(AC))
    print('WA x ' + str(WA))
    print('TLE x ' + str(TLE))
    print('RE x ' + str(RE))

main()

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

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

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

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

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


from collections import Counter


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

i = ['AC', 'WA', 'TLE', 'RE']
for j in i:
    print(j, 'x', count[j])

Solution (Python):


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

def main():
    mod=10**9+7
    N=I()
    from collections import defaultdict
    dd = defaultdict(int)
    for i in range(N):
        S=input()
        dd[S]+=1
        
    print("AC x",dd["AC"])
    print("WA x",dd["WA"])
    print("TLE x",dd["TLE"])
    print("RE x",dd["RE"])

main()

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

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

Solution (Python):
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for _ in range(n):
    s = input()
    if s == 'AC':
        ac += 1
    elif s == 'WA':
        wa += 1
    elif s == 'TLE':
        tle += 1
    elif s == 'RE':
        re += 1

print('AC x {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))

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

print("AC x "+str(l.count("AC")))
print("WA x "+str(l.count("WA")))
print("TLE x "+str(l.count("TLE")))
print("RE x "+str(l.count("RE")))

Solution (Python):
def resolve():
    n = int(input())
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for _ in range(n):
        result = input()
        if result == "AC":
            ac += 1
        elif result == "WA":
            wa += 1
        elif result == "TLE":
            tle += 1
        elif result == "RE":
            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())
s = list(input() for _ in range(n))

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