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, b, c, d = 0, 0, 0, 0
for i in range(n):
    s = input()
    if s == 'AC': a -= -1
    if s == 'WA': b -= -1
    if s == 'TLE': c -= -1
    if s == 'RE': d -= -1
print('AC x', a)
print('WA x', b)
print('TLE x', c)
print('RE x', d)

Solution (Python):
N = int(input())
a = 0
w = 0
t = 0
r = 0

for i in range(N):
    s = input()
    if s == 'AC':
        a += 1
    elif s == 'WA':
        w += 1
    elif s == 'TLE':
        t += 1
    else:
        r += 1

print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print('RE x '+str(r))

Solution (Python):
from collections import defaultdict

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

Solution (Python):



import sys
from collections import Counter

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N = i2n()
    cntr = Counter()
    for _ in range(N):
        S = i2s()
        cntr[S] += 1
    print(f'AC x {cntr["AC"]}')
    print(f'WA x {cntr["WA"]}')
    print(f'TLE x {cntr["TLE"]}')
    print(f'RE x {cntr["RE"]}')
    return

main()

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):
def resolve():
    from collections import defaultdict
    n = int(input())
    d = defaultdict(int)
    for i in range(n):
        d[input()] += 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__':
    resolve()

Solution (Python):
from collections import defaultdict
n=int(input())
s=defaultdict(int)
for i 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):
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())
temp = [0, 0, 0, 0]
for i in range(N):
    s = input()
    if s == "AC":
        temp[0] += 1
    elif s == "WA":
        temp[1] += 1
    elif s == "TLE":
        temp[2] += 1
    else:
        temp[3] += 1

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

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

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
    else:
        RE += 1

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

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

Solution (Python):
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

import collections
N = ri()
S = [rs() for i in range(N)]
d = collections.Counter(S)
print('AC x ', d['AC'], sep='')
print('WA x ', d['WA'], sep='')
print('TLE x ', d['TLE'], sep='')
print('RE x ', d['RE'], sep='')

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

count = [0, 0, 0, 0]
for i in range(N):
    out = input()
    if out == "AC":
        count[0] += 1
    elif out == "WA":
        count[1] += 1
    elif out == "TLE":
        count[2] += 1
    elif out == "RE":
        count[3] += 1

for i, a in zip(["AC", "WA", "TLE", "RE"], count):
    print(f"{i} x {a}")

Solution (Python):





import math
import fractions
import sys
import bisect
import heapq  
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr



def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod



def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a


inf = 10 ** 18
mod = 10 ** 9 + 7

n = ir()
s = [input() for i in range(n)]
dic = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(n):
    dic[s[i]]+=1
for k,v in dic.items():
    print('{} x {}'.format(k,v))

Solution (Python):
from collections import Counter
N = int(input())
S = list(input().rstrip() for _ in range(N))
c = Counter(S)

for k in ['AC', 'WA', 'TLE', 'RE']:
    count = c.get(k)
    if count is None:
        count = 0
    print('{} x'.format(k), count)

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())
a=0
b=0
c=0
d=0
for _ in range(n):
    g=input()
    if g=="AC":
        a+=1
    if g=="WA":
        b+=1
    if g=="TLE":
        c+=1    
    if g=="RE":
        d+=1
print("AC x "+str(a))
print("WA x "+str(b))
print("TLE x "+str(c))
print("RE x "+str(d))

Solution (Python):
n = int(input())
 
ac_counter = 0
wa_counter = 0
tle_counter = 0
re_counter = 0
 
for i in range(n):
  str = input()
  if str == "AC":
    ac_counter += 1
  elif str == "WA":
    wa_counter += 1
  elif str == "TLE":
    tle_counter += 1
  else :
    re_counter += 1
print("AC x",ac_counter)
print("WA x",wa_counter)
print("TLE x",tle_counter)
print("RE x",re_counter)

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

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

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

Solution (Python):
import math 

n = int(input())

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

for i in range(n):
	s = input()
	if s == "AC":
		ac += 1
	elif s == "RE":
		re += 1
	elif s == "WA":
		wa += 1
	else:
		tle += 1

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

Solution (Python):
n=int(input())
temp=[0]*4
ans=["AC","WA","TLE","RE"]
for i in range(n):
    s=input()
    for k,j in enumerate(ans):
        if s==j: temp[k]+=1
for i in range(4):
    print(ans[i]+" x "+str(temp[i]))

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

lst = ['AC', 'WA', 'TLE', 'RE']
for i in range(4):
    print(lst[i], 'x', ans[i])

Solution (Python):


N = int(input())

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

for i in range(N):
    S = input()
    if(S == 'AC'):
        AC += 1
    elif(S == 'WA'):
        WA += 1
    elif(S == 'TLE'):
        TLE += 1
    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):
from collections import Counter

n = int(input())
S = [input() for _ in range(n)]
S_cnt = Counter(S)

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

Solution (Python):
import sys
import math
from collections import deque

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()


def make_grid(h, w, num): return [[int(num)] * w for _ in range(h)]


def main():
    N = NI()
    D = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
    for i in range(N):
        D[SI()] += 1
    for x, y in D.items():
        print("{0} x {1}".format(x, y))


if __name__ == "__main__":
    main()

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

ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    temp = input()
    if(temp == "AC"):
        ac += 1
    elif(temp == "WA"):
        wa += 1
    elif(temp == "TLE"):
        tle += 1
    else:
        re += 1




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

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

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

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

    for ans in res:
        print(ans + ' x ' + str(S.count(ans)))

if __name__ == '__main__':
    main()

Solution (Python):
number = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(number):
    now = input()
    if now == "AC":
        ac += 1
    elif now == "WA":
        wa += 1
    elif now == "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)]

cs = ('AC', 'WA', 'TLE', 'RE')

for c in cs:
  print('{} x {}'.format(c, s.count(c)))

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

for i in range(n):
    s = str(input())
    if s == 'AC':
        ac += 1
    elif s == 'WA':
        wa += 1
    elif s == 'TLE':
        tle += 1
    else:
        re += 1

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

Solution (Python):
from collections import Counter

input = raw_input

n = int(input())
words = [input() for i in range(n)]
c = Counter(words)

keys = c.keys()
res_keys = ["AC", "WA", "TLE", "RE"]
for key in res_keys:
    if key in keys:
        num = c[key]
    else:
        num = 0
    out_txt = "%s x %d" % (key, num)
    print(out_txt)

Solution (Python):




from sys import stdin,stdout
from math import gcd, ceil, sqrt
from collections import Counter
ii1 = lambda: int(stdin.readline().strip())
is1 = lambda: stdin.readline().strip()
iia = lambda: list(map(int, stdin.readline().strip().split()))
isa = lambda: stdin.readline().strip().split()
mod = 1000000007

n = ii1()
arr = []
for i in range(n):
    arr.append(is1())
d = Counter(arr)
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(i + ' x ' + str(d[i]))

Solution (Python):
import collections
n = int(input())
verdicts = [input() for _ in range(n)]

counter = collections.Counter(verdicts)


for k in ("AC", "WA", "TLE", "RE"):
    print("%s x %s" % (k, counter.get(k, 0)))

Solution (Python):
from collections import defaultdict
import sys
input = sys.stdin.readline
N = int(input())

d = defaultdict(int)
for _ in range(N):
    s = input().strip()
    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):
from sys import stdin
import sys

N = int(input())
c1 = 0
c2 = 0
c3 = 0
c4 = 0
for i in range(N):
    a = input()
    if a == 'AC':
        c1 += 1
    elif a == 'WA':
        c2 += 1
    elif a == 'TLE':
        c3 += 1
    elif a == 'RE':
        c4 += 1
print("AC x ", c1)
print("WA x ", c2)
print("TLE x ", c3)
print("RE x ", c4)

Solution (Python):
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def Main():
    n = I()
    judge = [0]*4
    for _ in range(n):
        s = S()
        if s=='AC': judge[0] += 1
        elif s=='WA':   judge[1] += 1
        elif s=='TLE':  judge[2] += 1
        else:   judge[3] += 1
    
    print(f'AC x {judge[0]}')
    print(f'WA x {judge[1]}')
    print(f'TLE x {judge[2]}')
    print(f'RE x {judge[3]}')
    return

if __name__=='__main__':
    Main()

Solution (Python):
from collections import defaultdict

N = int(input())

d = defaultdict(int)

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

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

for s in li:
    print(s + " x " + str(d[s]))

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
    if s=="TLE":
        tle += 1
    if s=="WA":
        wa += 1
    if s=="RE":
        re += 1
for s,c in [("AC", ac), ("WA", wa), ("TLE", tle), ("RE", re)]:
    print("{} x {}".format(s, c))

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):
from collections import defaultdict

def solve():
    n = int(input())
    C = defaultdict(int)
    for _ in range(n):
        s = input().strip()
        C[s] += 1
    
    print('AC x', C['AC'])
    print('WA x', C['WA'])
    print('TLE x', C['TLE'])
    print('RE x', C['RE'])


if __name__ == '__main__':
    solve()

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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):
from collections import defaultdict
def solve():
    N = int(input())
    d = defaultdict(int)

    for _ in range(N):
        d[input()] += 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__':
    solve()

Solution (Python):
from collections import Counter

def main():
    N = int(input())
    S = []
    for i in range(N):
        S.append(input())
    c = Counter(S)

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

if __name__ == '__main__':
    main()

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

lis = [0] * 4
for _ in range(N):
  S = input()
  if S == 'AC':
    lis[0] += 1
  elif S == 'WA':
    lis[1] += 1
  elif S == 'TLE':
    lis[2] += 1
  elif S == 'RE':
    lis[3] += 1
    
print('AC x {}'.format(lis[0]))
print('WA x {}'.format(lis[1]))
print('TLE x {}'.format(lis[2]))
print('RE x {}'.format(lis[3]))

Solution (Python):
import sys

N=int(sys.stdin.readline())

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

for i in range(N):
  s=sys.stdin.readline().strip()
  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())
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 " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))

Solution (Python):
import sys
input=sys.stdin.readline
n=int(input())
ac,wa,tle,re=0,0,0,0
for _ in range(n):
    s=input().rstrip()
    if s=='AC':
        ac+=1
    elif s=='WA':
        wa+=1
    elif s=='TLE':
        tle+=1
    else:
        re+=1

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

Solution (Python):
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N = ii()
    ac,wa,tle,re = 0,0,0,0
    for i in range(N):
        t = input()
        if t == "AC":
            ac+= 1
        elif t == "WA":
            wa += 1
        elif t == "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))



if __name__ == "__main__":
    main()

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

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

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

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

for s_i in s:
    cnt[ s_i ] += 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):
def solve():
    n=int(input())
    d={
        'AC':0,
        'WA':0,
        'TLE':0,
        'RE':0
    }

    for i in range(n):
        si=input()
        d[si]+=1
    
    for k, v in d.items():
        print(f'{k} x {v}')


if __name__=='__main__':
    t=1
    for _ in range(t):
        solve()

Solution (Python):
from math import ceil
from collections import defaultdict as dd
import sys
input=sys.stdin.readline


l=['AC','WA','TLE','RE']
ans=[0]*4
n=int(input())
for i in range(n):
    s=input().split()[0]
    if(s==l[0]):
        ans[0]+=1
    if(s==l[1]):
        ans[1]+=1
    if(s==l[2]):
        ans[2]+=1
    if(s==l[3]):
        ans[3]+=1
for i in range(4):
    print(l[i],'x',ans[i])

Solution (Python):
N = int(input())
a = 0
b = 0
c = 0
d = 0

for _ 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):
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
c = [0]*4

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

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

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

n = int(input())
d = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0
}
for i in range(n):
    s = input().rstrip('\n')
    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())

li = [input() for _ in range(n)]

check = ['AC', 'WA', 'TLE', 'RE']
ans = [0] * 4

for i in li:
    for j in range(4):
        if i == check[j]:
            ans[j] += 1
            
for i in range(4):
    print(check[i] + ' x ' + str(ans[i]))

Solution (Python):
N = int(input())
A = 0
W = 0
T = 0
R = 0
for i in range(N):
  S = input()
  if S == "AC":
    A += 1

  elif S == "WA":
    W += 1
  
  elif S == "TLE":
    T += 1

  else:
    R += 1

print("AC x "+str(A))
print("WA x "+str(W))
print("TLE x "+str(T))
print("RE x "+str(R))

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

for i in range(n):
  judge=input()
  if judge=="AC":
    ac+=1
  elif judge=="WA":
    wa+=1
  elif judge=="TLE":
    tle+=1
  elif judge=="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
import pprint

sys.setrecursionlimit(10 ** 6)

class Logger:
	def __init__(self, debug):
		self.debug = debug
	def print(self, *args):
		if self.debug:
			pprint.pprint(args)


def main():
	log = Logger(0)
	n = int(sys.stdin.readline())
	s = []
	a = {}
	for i in range(n):
		s.append(input())
	for i in range(n):
		a[s[i]] = a.get(s[i], 0) + 1
	log.print(a)
	print("AC x {}".format(a.get("AC", 0)))
	print("WA x {}".format(a.get("WA", 0)))
	print("TLE x {}".format(a.get("TLE", 0)))
	print("RE x {}".format(a.get("RE", 0)))

	


main()

Solution (Python):
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res

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

N=II()
for i in range(N):
    RES[input()] += 1


for s in ["AC", "WA", "TLE", "RE"]:
    print("{} x {}".format(s, RES[s]))

Solution (Python):
N=int(input())
ans={'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(N):
  ans[input()]+=1
 
for k,v in ans.items():
  print('{} x {}'.format(k,v))

Solution (Python):
from collections import defaultdict
N = int(input())
dic=defaultdict(int)
for i in range(N):
  key=input()
  dic[key] += 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())
a = w = t = r = 0
for i in range(N):
    s = input()
    if s == "AC":
        a += 1
    elif s == "WA":
        w += 1
    elif s == "TLE":
        t += 1
    elif s == "RE":
        r += 1

print("AC x {}".format(a))
print("WA x {}".format(w))
print("TLE x {}".format(t))
print("RE x {}".format(r))

Solution (Python):


import collections


def summarize(ss):
    ctr = collections.Counter(ss)
    return ctr


def main():
    n = int(input())
    ss = [input() for _ in range(n)]
    ctr = summarize(ss)
    for status in "AC WA TLE RE".split():
        print("{} x {}".format(status, ctr[status]))


if __name__ == '__main__':
    main()

Solution (Python):

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


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

Solution (Python):


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

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):
from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math
from bisect import bisect,bisect_right,bisect_left

def get_int():
    return int(stdin.readline().strip())


def get_tuple():
    return map(int, stdin.readline().split())


def get_list():
    return list(map(int, stdin.readline().split()))

n = get_int()
dic = defaultdict(int)
for _ in range(n):
    st = input()
    dic[st] += 1
for val in ['AC','WA','TLE','RE']:
    print(val+" x "+str(dic[val]))

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',dic['AC'])
print('WA x',dic['WA'])
print('TLE x',dic['TLE'])
print('RE x',dic['RE'])

Solution (Python):
N=int(input())
res=["AC","WA","TLE","RE"]
C=[0,0,0,0]
for i in range(N):
    C[res.index(input())]+=1

for j in range(4):
    print(res[j]+" x "+str(C[j]))

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

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

Solution (Python):

MOD = 10 ** 9 + 7
INFI = 10**10

import math
from collections import deque
import itertools
import heapq

from fractions import Fraction
import copy
from functools import lru_cache
from collections import defaultdict
import pprint




def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default




def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)

def soinsubunkai(n):
    a = []
    i = 1
    while i*i <= n:
        if n % i == 0 and i!=1:
            a.append(i)
            n=n//i

        if n% i !=0 or i==1:
            i += 1
    nokori=[n]
    return a + nokori

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

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



if __name__ == "__main__":

    main()

Solution (Python):
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")

INF = float("inf")


d = defaultdict(int)
N = int(input())
for i in range(N):
    s = list(input())[:-1]
    if s[0] == "A":
        d["A"] += 1
    elif s[0] == "W":
        d["W"] += 1
    elif s[0] == "T":
        d["T"] += 1
    else:
        d["R"] += 1
print("AC","x",d["A"])
print("WA","x",d["W"])
print("TLE","x",d["T"])
print("RE","x",d["R"])

Solution (Python):


import sys
stdin = sys.stdin
from collections import defaultdict

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n = ni()
    s = defaultdict(int)
    for _ in range(n):
        a = ns()
        s[a] += 1

    print("AC x {}".format(s["AC"]))
    print("WA x {}".format(s["WA"]))
    print("TLE x {}".format(s["TLE"]))
    print("RE x {}".format(s["RE"]))
if __name__ == "__main__":
    main()