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



Sample input:
6
AC
TLE
AC
AC
WA
TLE


Sample output:
AC x 3
WA x 1
TLE x 2
RE x 0

Submission status: Accepted

Solution code:
n=int(input())
ans=[0 for i in range(4)]
for i in range(n):
    k=input()
    if k=="AC":
        ans[0]+=1
    if k=="WA":
        ans[1]+=1
    if k=="TLE":
        ans[2]+=1
    if k=="RE":
        ans[3]+=1
print("AC x",ans[0])
print("WA x",ans[1])
print("TLE x",ans[2])
print("RE x",ans[3])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, math,os
from io import BytesIO, IOBase
#data = BytesIO(os.read(0,os.fstat(0).st_size)).readline
# from bisect import bisect_left as bl, bisect_right as br, insort
# from heapq import heapify, heappush, heappop
from collections import defaultdict as dd, deque, Counter
# from itertools import permutations,combinations
# from decimal import Decimal
def data(): return sys.stdin.readline().strip()
def mdata(): return list(map(int, data().split()))
def outl(var): sys.stdout.write(' '.join(map(str, var)) + '\n')
def out(var): sys.stdout.write(str(var) + '\n')
#sys.setrecursionlimit(100000 + 1)
INF = 10**9
mod = 998244353

n=int(data())
d=dd(int)
for i in range(n):
    s=data()
    d[s]+=1
print('AC x', d["AC"])
print('WA x', d["WA"])
print('TLE x', d["TLE"])
print('RE x', d["RE"])

Submission status: Accepted

Solution code:
N=int(input())
S=[input() for i in range(N)]
kekka=[0]*4
for i in range(N):
    if S[i]=="AC":
        kekka[0]+=1
    elif S[i]=="WA":
        kekka[1]+=1
    elif S[i]=="TLE":
        kekka[2]+=1
    elif S[i]=="RE":
        kekka[3]+=1
aaa=["AC","WA","TLE","RE"]
for i in range(4):
    print("{} x {}".format(aaa[i],kekka[i]))

Submission status: Accepted

Solution code:
#! /usr/bin/env python3

import sys
import numpy as np
from collections import defaultdict
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N = int(readline())
S = list(read().decode().split())

dicts = defaultdict(int)

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

for t in ["AC", "WA", "TLE", "RE"]:
    print(f'{t} x {dicts[t]}')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections as c

n = int(input())

x = []

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

s = c.Counter(x)

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

for i in p:
    print(i,"x",s[i])

Submission status: Accepted

Solution code:
def input_int():
    return map(int, input().split())

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

N=one_int()

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

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

for i in range(N):
    s = one_str()
    dicts[s] += 1


for aa in a:
    print(aa+" x "+str(dicts[aa]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
"""    Arnab Chanda    """

from collections import defaultdict, deque
from itertools import permutations
from sys import stdin,stdout
from bisect import bisect_left, bisect_right
from copy import deepcopy
import heapq

int_input=lambda : int(stdin.readline())
string_input=lambda : stdin.readline().split()
multi_int_input =lambda : map(int, stdin.readline().split())
multi_input = lambda : stdin.readline().split()
list_input=lambda : list(map(int,stdin.readline().split()))
string_list_input=lambda: list(string_input())
MOD = pow(10,9)+7

n = int_input()

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

for i in range(n):
    ver = input()

    map[ver] += 1

for k in map:
    print(k+" x "+str(map[k]))

Submission status: Accepted

Solution code:
# coding: utf-8
import sys
# from operator import itemgetter
sysread = sys.stdin.readline
read = sys.stdin.read
sys.setrecursionlimit(10 ** 7)
#from heapq import heappop, heappush
#from collections import OrderedDict, defaultdict
#import math
#from itertools import product, accumulate, combinations, product
#import bisect# lower_bound etc
#import numpy as np
#from copy import deepcopy
#from collections import deque
#import numba

def run():
    ret = [0,0,0,0]
    N = int(input())
    for i in range(N):
        s = input()
        if s == 'AC': ret[0]+=1
        elif s == 'WA': ret[1]+=1
        elif s == 'TLE': ret[2]+=1
        else: ret[3]+=1
    print(f'AC x {ret[0]}')
    print(f'WA x {ret[1]}')
    print(f'TLE x {ret[2]}')
    print(f'RE x {ret[3]}')
if __name__ == "__main__":
    run()

Submission status: Accepted

Solution code:

#!/usr/bin/python
# -*- coding: utf-8 -*-

import numpy as np

def int_mtx(N):
    x = []
    for _ in range(N):
        x.append(input())
    return np.array(x)

N = int(input())
S = int_mtx(N)

acc = np.count_nonzero(S == "AC")
wac = np.count_nonzero(S == "WA")
tlec = np.count_nonzero(S == "TLE")
rec = np.count_nonzero(S == "RE")

print("AC x "+str(acc))
print("WA x "+str(wac))
print("TLE x "+str(tlec))
print("RE x "+str(rec))

Submission status: Accepted

Solution code:
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"]))

Submission status: Accepted

Solution code:
n=int(input())
data=[input() for _ in range(n)]
cnt=[0]*4

for d in data:
    if d == 'AC':
        cnt[0]+=1
    elif d == 'WA':
        cnt[1]+=1
    elif d == 'TLE':
        cnt[2]+=1
    elif d == 'RE':
        cnt[3]+=1

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def II(): return int(sys.stdin.readline())


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


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


def main():
    N = II()
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for i in range(N):
        target = input()
        if target == "AC":
            ac += 1
        if target == "WA":
            wa += 1
        if target == "TLE":
            tle += 1
        if target == "RE":
            re += 1
    print("AC x "+str(ac))
    print("WA x "+str(wa))
    print("TLE x "+str(tle))
    print("RE x "+str(re))


# oj t -c "pypy3 main.py"
# acc s main.py -- --guess-python-interpreter pypy
main()

Submission status: Accepted

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

for i in d :
    print("{} x {}".format(i,d[i]))

Submission status: Accepted

Solution code:
N = int(input())


dic = {}
for i in range(N):
    s = input()

    if s in dic:
        dic[s] += 1
    else:
        dic[s] = 1


print('AC x {}'.format(dic.get('AC', 0)))
print('WA x {}'.format(dic.get('WA', 0)))
print('TLE x {}'.format(dic.get('TLE', 0)))
print('RE x {}'.format(dic.get('RE', 0)))

Submission status: Accepted

Solution code:
n = int(input())

ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    w = input()
    if(w == 'AC'):
        ac += 1
    elif(w == 'WA'):
        wa += 1
    elif(w == 'TLE'):
        tle += 1
    elif(w == 'RE'):
        re += 1

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

Submission status: Accepted

Solution code:
N=int(input())
li=[input() for i in range(N)]

a=li.count("AC")
b=li.count("WA")
c=li.count("TLE")
d=li.count("RE")

print("AC x "+str(a))
print("WA x "+str(b))
print("TLE x "+str(c))
print("RE x "+str(d))

Submission status: Accepted

Solution code:
judges = ['AC', 'WA', 'TLE', 'RE']
n =  int(input())
S = [input() for _ in range(n)]
for j in judges:
    print(f'{j} x {S.count(j)}')

Submission status: Accepted

Solution code:
def main():
    N=int(input())
    ans={"AC":0,"WA":0,"TLE":0,"RE":0}
    for _ in range(N):
        S=input()
        ans[S]+=1
    for i in ans.keys():
        print(i,"x",ans[i])


main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

ac, wa, tle, re = 0, 0, 0, 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))

Submission status: Accepted

Solution code:
from sys import stdin
from collections import Counter
c = Counter()
for _ in range(int(stdin.readline())):
    v = stdin.readline().strip()
    c[v] += 1
print(f'AC x {c["AC"]}')
print(f'WA x {c["WA"]}')
print(f'TLE x {c["TLE"]}')
print(f'RE x {c["RE"]}')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
l=[input() for i in range(n)]
ac=l.count("AC")
wa=l.count("WA")
tle=l.count("TLE")
re=l.count("RE")
print("AC x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))

Submission status: Accepted

Solution code:
#! env/bin/local python3
# -*- coding: utf-8 -*-

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

while True:
    try:
        counter[input()] += 1
    except EOFError:
        break

for key, value in counter.items():
    print(f"{key} x {value}")

Submission status: Accepted

Solution code:
N = int(input())
ans = [0,0,0,0]
for i in range(N):
    s = input()
    if s == "AC":
        ans[0] += 1
    elif s == "WA":
        ans[1] += 1
    elif s == "TLE":
        ans[2] += 1
    else:
        ans[3] += 1
print("AC x",end = " ")
print(ans[0])
print("WA x",end = " ")
print(ans[1])
print("TLE x",end = " ")
print(ans[2])
print("RE x",end = " ")
print(ans[3])

Submission status: Accepted

Solution code:
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',AC)
print('WA','x',WA)
print('TLE','x',TLE)
print('RE','x',RE)

Submission status: Accepted

Solution code:
n = int(input())

a = 0
w = 0
t = 0
r = 0

for _ 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 ",end="")
print(a)
print("WA x ",end="")
print(w)
print("TLE x ",end="")
print(t)
print("RE x ",end="")
print(r)

Submission status: Accepted

Solution code:
N = int(input())
n_AC = 0
n_WA = 0
n_TLE = 0
n_RE = 0
for i in range(N):
    x = input()
    if x == 'AC':
        n_AC += 1
    elif x == 'WA':
        n_WA += 1
    elif x == 'TLE':
        n_TLE += 1
    elif x == 'RE':
        n_RE += 1

print(f'AC x {n_AC}')
print(f'WA x {n_WA}')
print(f'TLE x {n_TLE}')
print(f'RE x {n_RE}')

Submission status: Accepted

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

for s in ('AC', 'WA', 'TLE', 'RE'):
   print(s, ' x', d[s])

Submission status: Accepted

Solution code:
N = int(input())

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

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

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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']))

Submission status: Accepted

Solution code:
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])
	#res.append(ans)
#print('\n'.join(map(str, res)))

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution code:
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]);

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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']))

Submission status: Accepted

Solution code:
N = int(input())
# = str(input())
# = map(int, input().split())
# = list(map(int, input().split()))
S = [str(input()) for i in range(N)]
# = [list(map(int, input().split())) 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"))

Submission status: Accepted

Solution code:
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"))

Submission status: Accepted

Solution code:
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]}')

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
# template by 3xC and starkizard.
# contributors: 

#####################################################################################
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"""


# from bisect import bisect_left, bisect_right, insort
# from heapq import heappop, heapify, heappush
# from random import randint as rn
# from Queue import Queue as Q
# from copy import deepcopy
# from decimal import *
# import re
# import operator

#####################################################################################
# this enables you to write python3 code with PyPy2 (Python 2)
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"""
# import threading
# threading.stack_size(1<<27)
# sys.setrecursionlimit(10000)

def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    # Comment code out when you don't need inverse factorial or vice versa
    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 = []
    #rdivisors=[]
    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): # math.gcd is slower
    """ 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) #returns math.ceil but protecting against floating inconsistencies
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) #inputs integer
def mi(): return map(int, input().split()) # inputting space seperated variables for example x,y,z
def li(): return list(map(int, input().split())) #inputting a space seperated list of integers
def lw(): return input().split() #inputting a space seperated list of strings
def lcm(a, b): return abs(a * b) // gcd(a, b) #returns LCM of two arguments
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) #For printing an iterable with seperator sep as optional second argument (default : " "), ending character (default: "\n") as optional third
def dd(): return defaultdict(int) #returns a dictionary with values defaulted to 0
def ddl(): return defaultdict(list) #returns a dictionary with values defaulted to []
def write(s): return sys.stdout.write(s)












###################################################################
# code goes here
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')
# sys.stdin = open('input.txt', 'r')
# sys.stdout = open('output.txt', 'w')

""" main function"""

if __name__ == '__main__':
    main()
    #threading.Thread(target=main).start()

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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"]))

Submission status: Accepted

Solution code:
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"]))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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"]))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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]}')

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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]))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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 ) )

Submission status: Accepted

Solution code:
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]))

Submission status: Accepted

Solution code:
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"]) )

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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}')