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())
AC=0
WA=0
TLE=0
RE=0
for i in range(n):
  x=str(input())
  if x=="AC":
    AC+=1
  elif x=="WA":
    WA+=1
  elif x=="TLE":
    TLE+=1
  elif x=="RE":
    RE+=1
print("AC x "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

Solution (Python):
import sys

sys.setrecursionlimit(1000000)

import bisect
import math
import collections
import heapq


def solve(N, Ss):
    c = collections.Counter(Ss)
    c.update(["AC", "WA", "TLE", "RE"])
    return "\n".join(["AC x " + str(c["AC"]-1),
                      "WA x " + str(c["WA"] - 1),
                      "TLE x " + str(c["TLE"] - 1),
                      "RE x " + str(c["RE"] - 1)])


if __name__ == "__main__":
    N = int(input())
    Ss = [input() for _ in range(N)]
    print(solve(N, Ss))

Solution (Python):
d={}
d['AC']=0
d['WA']=0
d['TLE']=0
d['RE']=0
for i in range(int(input())):
    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):
import sys
from math import ceil
input=sys.stdin.readline
_lii=lambda :list(map(int, input().strip('\n').split()))
_i=lambda :input().strip('\n')
res=[]
g={'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for _ in range(int(input())):
	g[input().strip('\n')]+=1
for c in g.keys():
	print(c, 'x', g[c])

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

Solution (Python):
n = int(input())
list = [0]*4

for i in range(n):
    a = str(input());
    if a == 'AC':
        list[0]+=1;
    elif a == 'WA':
        list[1]+=1;
    elif a == 'TLE':
        list[2]+=1;
    else:
        list[3]+=1;

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

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

lis2 = ['AC', 'WA', 'TLE', 'RE']
for cnt, name in zip(lis, lis2):
    print('{} x {}'.format(name, cnt))

Solution (Python):
import collections

n = int(input())
s = [input() for _ in range(n)]
s = collections.Counter(s)
print('AC x {}'.format(s['AC']))
print('WA x {}'.format(s['WA']))
print('TLE x {}'.format(s['TLE']))
print('RE x {}'.format(s['RE']))

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



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


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

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

Solution (Python):
from collections import defaultdict

n = int(input())

d = defaultdict(int)

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

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

for i in l:
    print(f'{i} x {d[i]}')

Solution (Python):
n=int(input())
s=[]
for i in range(n):
    s.append(input())
l = ["AC","WA","TLE","RE"]
cnt=[0,0,0,0]
for i in range(n):
    index=l.index(s[i])
    cnt[index]+=1
for i in range(4):
    print("{0} x {1}".format(l[i],cnt[i]))

Solution (Python):
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  x = input()
  if(x=='AC'):
    AC += 1
  elif(x=='WA'):
    WA += 1
  elif(x=='TLE'):
    TLE += 1
  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):




from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""













if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip



"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""




def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod

    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)

def ncr(n, r,  fact, ifact,MOD=mod):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t
    return divs_number


def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): 
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def check_sorted(a):
    ''' returns True/False '''
    for i in range(len(a)-1):
        if a[i]>a[i+1]:
            return False
    return True

def print_arr2d(a):
    for i in a:
        prr(i)
    
def ceil(n, k=1): return n // k + (n % k != 0) 
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) 
def mi(): return map(int, input().split()) 
def li(): return list(map(int, input().split())) 
def lw(): return input().split() 
def lcm(a, b): return abs(a * b) // gcd(a, b) 
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) 
def dd(): return defaultdict(int) 
def ddl(): return defaultdict(list) 
def write(s): return sys.stdout.write(s)














def main(): 
    n=ii()
    d={"AC":0,"WA":0,"TLE":0,"RE":0}
    for i in range(n):
        d[input()]+=1
    for i in ["AC","WA","TLE","RE"]:
        print(i,"x",d[i])
        

                

                    




        
    
        
        
    


            


            
                
            

            



                






        
        


    
    
                

    

""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""

py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange

import os, sys
from io import IOBase, BytesIO

BUFSIZE = 8192

class FastIO(BytesIO):
    newlines = 0

    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None

    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s

    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()

    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)


class IOWrapper(IOBase):

    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')



""" main function"""

if __name__ == '__main__':
    main()

Solution (Python):
import sys

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


def resolve():
    n = int(input())
    S = list(input() for _ in range(n))
    AC = S.count("AC")
    WA = S.count("WA")
    TLE = S.count("TLE")
    RE = S.count("RE")

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


if __name__ == '__main__':
    resolve()

Solution (Python):
from collections import Counter
N = int(input())
x = []
for _ in range(N):
    x.append(input())
c = Counter(x)
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):
dic = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}

n = int(input())

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

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

Solution (Python):
n = int(input())
ac_cnt = 0
wa_cnt = 0
tle_cnt = 0
re_cnt = 0
for i in  range(n):
    s = input()
    if s == 'AC':
        ac_cnt += 1
    elif s == 'WA':
        wa_cnt += 1
    elif s == 'TLE':
        tle_cnt += 1
    elif s == 'RE':
        re_cnt += 1
print('AC x ' + str(ac_cnt))
print('WA x ' + str(wa_cnt))
print('TLE x ' + str(tle_cnt))
print('RE x ' + str(re_cnt))

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

from collections import Counter

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

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

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

Solution (Python):
from collections import Counter
n = int(input())
A = []
for i in range(n):
  a = input()
  A.append(a)
  
C = Counter(A)
for judge in ['AC','WA','TLE','RE']:
  print(f'{judge} x {C[judge]}')

Solution (Python):

from collections import Counter
n = int(input())
s = [input() for _ in range(n)]
p = Counter(s)
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(i + ' x ' + str(p[i]))

Solution (Python):
num = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for x in range(num):
    strval = input()
    if strval == "AC": ac += 1
    elif strval == "WA": wa += 1
    elif strval == "TLE": tle += 1
    elif strval == "RE": re += 1

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

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  
def LS2(): return list(sys.stdin.readline().rstrip())  

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

a = 0
b = 0
c = 0
d = 0
for i in range(N):
    if S[i] == 'AC':
        a += 1
    elif S[i] == 'WA':
        b += 1
    elif S[i] == 'TLE':
        c += 1
    else:
        d += 1

print('AC x {}'.format(a))
print('WA x {}'.format(b))
print('TLE x {}'.format(c))
print('RE x {}'.format(d))

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
  elif a == "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())
t = ["AC", "WA", "TLE", "RE"]
cnt = [0] * 4
for _ in range(n):
    s = input()
    for i in range(4):
        if s == t[i]:
            cnt[i] += 1
            break
for i in range(4):
    print(t[i] + " x " + str(cnt[i]))

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

from collections import Counter
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"]) )

Solution (Python):
import math
import itertools
import collections
import bisect
import heapq

def IN(): return int(input())
def sIN(): return input()
def MAP(): return map(int,input().split())
def LMAP(): return list(map(int,input().split()))
def TATE(n): return [input() for i in range(n)]
MOD = 10**9 + 7

n = IN()
dic = {'AC':0,'WA':0,'TLE':0,'RE':0}

for i in range(n):
  s = sIN()
  dic[s] += 1
  
for key,value in dic.items():
  print(key,'x',value)

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

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


AC_num=S.count("AC")
WA_num=S.count("WA")
TLE_num=S.count("TLE")
RE_num=S.count("RE")

print("AC x",AC_num)
print("WA x",WA_num)
print("TLE x",TLE_num)
print("RE x",RE_num)

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

count = dict.fromkeys(["AC", "WA", "TLE", "RE"], 0)

for idx in range(N):
  S = input()
  count[S] += 1

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

Solution (Python):
import sys

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

n = ni()
res = {'AC':0,'WA':0,'TLE':0,'RE':0}
for _ in range(n):
    s = ns()
    res[s] += 1
for i,j in res.items():
    print(f'{i} x {j}')

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

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

Solution (Python):
n = int(input())
c = [0]*4
for _ 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 '+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())
d = {'AC':0,'WA':0,'TLE':0,'RE':0}
for _ in range(N):
    d[input()] += 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())
S = [input() for _ in range(N)]

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

for s in S:
    res[s] += 1

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

Solution (Python):
import collections

N = int(input())
ans = []
for _ in range(N):
    ans.append(input())

c = collections.Counter(ans)

if 'AC' in c:
    print('AC x', c['AC'])
else:
    print('AC x', 0)

if 'WA' in c:
    print('WA x', c['WA'])
else:
    print('WA x', 0)

if 'TLE' in c:
    print('TLE x', c['TLE'])
else:
    print('TLE x', 0)

if 'RE' in c:
    print('RE x', c['RE'])
else:
    print('RE 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 {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

Solution (Python):
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    S = [input().rstrip() for i in range(N)]
    R = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    for i in S:
        R[i] += 1
    print('AC x {}'.format(R['AC']))
    print('WA x {}'.format(R['WA']))
    print('TLE x {}'.format(R['TLE']))
    print('RE x {}'.format(R['RE']))

if __name__ == '__main__':
    main()

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

num = [0] * 4
for i in range(N):
    S = input()
    if S == "AC":
        num[0] += 1
    elif S == "WA":
        num[1] += 1
    elif S == "TLE":
        num[2] += 1
    else:
        num[3] += 1
for i, value in enumerate(["AC", "WA", "TLE", "RE"]):
    print(value, "x", num[i])

Solution (Python):

import sys


def solve(N: int, S: "List[str]"):
    from collections import Counter
    C = Counter(S)
    for st in ["AC", "WA", "TLE", "RE"]:
        print("{} x {}".format(st, C[st]))


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    S = [next(tokens) for _ in range(N)]  
    solve(N, S)

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    
    main()

Solution (Python):
n = int(input())
c0, c1, c2, c3 = 0, 0, 0, 0
for _ 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):


import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())
from collections import Counter

def resolve():
    it = iter(sys.stdin.read().split())
    N = int(next(it))
    cc = Counter(it)

    for s in ["AC", "WA", "TLE", "RE"]:
        print(f"{s} x {cc[s]}")

if __name__ == "__main__":
    resolve()

Solution (Python):




import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
import copy














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

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

Solution (Python):


N = int(input())

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

for _ 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):
import sys

def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))

def main():
    n = II()
    res = {
        'AC': 0,
        'WA': 0,
        'TLE': 0,
        'RE': 0}
    for i in range(n):
        res[IS()] += 1
    for k,v in res.items():
        print('{} x {}'.format(k, v))

if __name__ == '__main__':
    main()

Solution (Python):
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
    elif s == "RE":
        RE += 1

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

Solution (Python):










N = int(input())




a=0
b=0
c=0
d=0
for i in range(N):
    S = str(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())
num_ac = 0
num_wa = 0
num_tle = 0
num_re = 0

for i in range(n):
    s = input()
    if s == "AC":
        num_ac += 1
    elif s == "WA":
        num_wa += 1
    elif s == "TLE":
        num_tle += 1
    elif s == "RE":
        num_re += 1


print("AC x {}".format(num_ac))
print("WA x {}".format(num_wa))
print("TLE x {}".format(num_tle))
print("RE x {}".format(num_re))

Solution (Python):
L = ['AC', 'WA', 'TLE', 'RE']
cnt = [0] * 4
N = int(input())
for _ in range(N):
    cnt[L.index(input())] += 1
for i in range(4):
    print(L[i] + ' x ' + str(cnt[i]))

Solution (Python):
from functools import reduce
from fractions import gcd
from collections import defaultdict
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")



def main():
    N = int(input())
    d = defaultdict(int)
    for _ in range(N):
        S = input()[:-1]
        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"]))


if __name__ == '__main__':
    main()

Solution (Python):
def main():
    n = int(input())
    d = {'AC':0,'WA':0,'TLE':0,'RE':0}
    for _ in range(n):
        d[input()] += 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']))

main()

Solution (Python):
_MULTITEST = False

def solve():
    D = {
        "AC" : 0,
        "WA" : 0,
        "TLE" : 0,
        "RE" : 0
    }

    n = int(input())
    for i in range(n):
        verdict = str(input())
        D[verdict] = D[verdict]+1
    print("AC x ", D["AC"])
    print("WA x ", D["WA"])
    print("TLE x ", D["TLE"])
    print("RE x ", D["RE"])


if __name__ == "__main__":
    t = (int(input()) if _MULTITEST else 1)
    for tt in range(t):
        solve()

Solution (Python):
import sys
import collections

def main():
    n = int(input())
    s = collections.Counter([i.rstrip() for i in sys.stdin.readlines()])
    for x in ["AC", "WA", "TLE", "RE"]:
        print(x, "x", s[x])

if __name__ == "__main__":
    main()

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

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

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n=ni()

j = dict()
j['AC']=0
j['WA']=0
j['TLE']=0
j['RE']=0
for i in range(n):
  s=input()
  j[s]+=1

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

Solution (Python):
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy




def main():
    N = int(input())
    hoge = defaultdict(int)
    for _ in range(N):
        s = input()
        hoge[s] += 1
    print("AC x", hoge["AC"])
    print("WA x", hoge["WA"])
    print("TLE x", hoge["TLE"])
    print("RE x", hoge["RE"])

if __name__ == '__main__':
    main()

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

Solution (Python):
n = int(input())
l = [0]*4
for i in range(n):
  j = input()
  if j == "AC":
    l[0] += 1
  if j == "WA":
    l[1] += 1
  if j == "TLE":
    l[2] += 1
  if j == "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):


from pprint import pprint
import sys

sys.setrecursionlimit(10 ** 6)
INF = float('inf')


n = int(input())
str_list = []
for _ in range(n):
    s = str(input())
    str_list.append(s)


res = [0] * 4

for s in str_list:
    if s == 'AC':
        res[0] += 1
    if s == 'WA':
        res[1] += 1
    if s == 'TLE':
        res[2] += 1
    if s == 'RE':
        res[3] += 1

print(f'AC x {res[0]}')
print(f'WA x {res[1]}')
print(f'TLE x {res[2]}')
print(f'RE x {res[3]}')

Solution (Python):
a=int(input())
A=0
W=0
T=0
R=0
for i in range(a):
  tex=input()
  if tex=="AC":
    A+=1
  elif tex=="WA":
    W+=1
  elif tex=="TLE":
    T+=1
  elif tex=="RE":
    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())

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(f'AC x {AC}')
print(f'WA x {WA}')
print(f'TLE x {TLE}')
print(f'RE x {RE}')

Solution (Python):
from sys import stdin


def main():
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  
    S_arr = []
    for i in range(N):
        _ = _in[i+1]
        S_arr.append(_)
    
    c_arr = [0] * 4
    for S in S_arr:
        if S == 'AC':
            c_arr[0] += 1
        elif S == 'WA':
            c_arr[1] += 1
        elif S == 'TLE':
            c_arr[2] += 1
        else:
            c_arr[3] += 1
    
    print(f'AC x {c_arr[0]}')
    print(f'WA x {c_arr[1]}')
    print(f'TLE x {c_arr[2]}')
    print(f'RE x {c_arr[3]}')


if __name__ == "__main__":
    main()

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

Solution (Python):

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    n = int(input())
    s = [input() for _ 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
        elif i == "RE":
            re += 1

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




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

Solution (Python):
from collections import Counter


N = int(input())
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']))