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
wc=0
tc=0
rc=0

for i in range(N):
    s=input()

    if "AC"==s:
        ac+=1
    elif "WA"==s:
        wc+=1
    elif "TLE"==s:
        tc+=1
    elif "RE"==s:
        rc+=1

print("AC x "+str(ac))
print("WA x "+str(wc))
print("TLE x "+str(tc))
print("RE x "+str(rc))

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

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

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 == "WA":
        WA += 1
    if s == "TLE":
        TLE += 1
    if 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 = dict()
for _ in range(N):
    s = input()
    S[s] = S.get(s, 0) + 1
for k in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{k} x {S.get(k, 0)}')

Solution (Python):
n = int(input())
ac = 0
re = 0
tle = 0
wa = 0
for i in range(n):
    t = input()
    if t[0]=="A":
        ac+=1
    if t[0] == "T":
        tle +=1
    if t[0] == "W":
        wa += 1
    if t[0] == "R":
        re += 1
print("AC","x",ac)
print("WA","x",wa)
print("TLE","x",tle)
print("RE","x",re)

Solution (Python):


from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2, log10, pi
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key


INF=1001001001
__MOD__=(10**9)+7
yn = 'YNeos'
judge = False
cnt = 0
ans = None


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

def intinput():
    return int(input())

def mulinputs():
    return map(int,input().split())

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas

class ModInt():
    def __init__(self, x):
        self.__x = (x % __MOD__)
    def __add__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x + other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x + other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __radd__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x + self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x + self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __sub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x - other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x - other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rsub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x - self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x - self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __mul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rmul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __truediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rtruediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __pow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(self.__x, other.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(self.__x, other.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")
    def __rpow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(other.__x, self.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(other.__x, self.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")

    def __modinv(self, m=__MOD__):
        a = self.__x
        if a == 0:
            raise ZeroDivisionError()
        if gcd(a, m) != 1:
            raise Exception("%sの逆数は求まりません。" % a)
        b, u, v = m, 1, 0
        while b != 0:
            t = a//b;
            a -= t*b
            a, b = b, a
            u -= t * v
            u, v = v, u
        u %= m
        if u < 0:
            u += m
        return u
    def __int__(self):
        return self.__x
    def __str__(self):
        return str(self.__x)



if __name__ == '__main__':
    N = intinput()
    ss = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    for _ in range(N):
        s = input()
        ss[s] += 1

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

Solution (Python):




import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline
    ans={}
    ans["AC"]=0
    ans["WA"]=0
    ans["TLE"]=0
    ans["RE"]=0
    
    
    n=int(readline())
    for i in range(n):
        s=readline().rstrip()
        ans[s]+=1
    print("AC x ",end="")
    print(ans["AC"])
    print("WA x ",end="")
    print(ans["WA"])
    print("TLE x ",end="")
    print(ans["TLE"])
    print("RE x ",end="")
    print(ans["RE"])
    

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N = i()
S = [s() for _ in range(N)]
ac = S.count('AC')
wa = S.count('WA')
tle = S.count('TLE')
re = S.count('RE')
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 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

def resolve():
    
    n=int(input())
    l=[0]*4
    for i in range(n):
        s=input()
        if s=='AC':
            l[0]+=1
        elif s=='WA':
            l[1]+=1
        elif s=='TLE':
            l[2]+=1
        else:
            l[3]+=1
    print('AC x '+str(l[0]))
    print('WA x '+str(l[1]))
    print('TLE x '+str(l[2]))
    print('RE x '+str(l[3]))



    

    
resolve()

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

Solution (Python):
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
S = Counter(S)
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())
S = []
AC = 0
WA = 0
TLE = 0
RE = 0
for i 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 "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

Solution (Python):
N = int(input())
S = []

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

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

import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"




count = defaultdict(int)
count = {"AC" : 0 , "WA" : 0, "TLE" : 0, "RE" : 0}
for ii in range(int(input())):
	
	s = input()
	count[s]+=1
print("AC x",count["AC"])
print("WA x",count["WA"])
print("TLE x",count["TLE"])
print("RE x",count["RE"])

Solution (Python):


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

nac = nwa = ntle = nre = 0 
for i in range(n):
    if s[i] == 'AC':
        nac += 1
    if s[i] == 'WA':
        nwa += 1
    if s[i] == 'TLE':
        ntle += 1
    if s[i] == 'RE':
        nre += 1

print('AC x {}'.format(nac))
print('WA x {}'.format(nwa))
print('TLE x {}'.format(ntle))
print('RE x {}'.format(nre))

Solution (Python):
from collections import Counter

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


c = Counter(s)

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

Solution (Python):

import sys


def solve(N: int, S: "List[str]"):
    for res in ['AC', 'WA', 'TLE', 'RE']:
        print(f"{res} x {S.count(res)}")
    return



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)

if __name__ == '__main__':
    main()

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

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

A = 0
W = 0
T = 0
R = 0
for i in range(N):
    word = input()
    if ("AC" == word):
        A += 1
    elif ("WA" == word):
        W += 1
    elif ("TLE" == word):
        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):
import sys
from collections import Counter

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
words = read().rstrip().decode().split()

counter = Counter(words)
for x in ['AC', 'WA', 'TLE', 'RE']:
    n = counter[x]
    print('{} x {}'.format(x, n))

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

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

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

for key in keys:
  print(key, "x", int(res[key]))

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

ans = dict()
ans["AC"] = 0
ans["WA"] = 0
ans["TLE"] = 0
ans["RE"] = 0
for i in range(N):
    s = input()
    ans[s] += 1

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

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

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

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

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

ss = []
for s in range(n):
    ss.append(input())

print(f'AC x {ss.count("AC")}')
print(f'WA x {ss.count("WA")}')
print(f'TLE x {ss.count("TLE")}')
print(f'RE x {ss.count("RE")}')

Solution (Python):
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
c = Counter(S)
for a in ["AC", "WA", "TLE", "RE"]:
    print(a, "x", c[a])

Solution (Python):
AC = 0
WA = 0
TLE = 0
RE = 0
 
N = int(input())
for i in range(N):
  l = input()
  if l == "AC":
    AC += 1
  elif l == "WA":
    WA += 1
  elif l == "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):
"""
    こんにちは。これはクシャルです
    
    Author : thekushalghosh (クシャル)
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time,heapq
start_time = time.time()



def solve():
    n = inp()
    q,w,qq,ww = 0,0,0,0
    for i in range(n):
        s = insr()
        if s == "AC":
            q = q + 1
        elif s == "WA":
            w = w + 1
        elif s == "TLE":
            qq = qq + 1
        else:
            ww = ww + 1
    print("AC x",q)
    print("WA x",w)
    print("TLE x",qq)
    print("RE x",ww)
    


 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    

def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 

def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)

def counter_elements(a):
    q = dict()
    for i in range(len(a)):
        if a[i] not in q:
            q[a[i]] = 0
        q[a[i]] = q[a[i]] + 1
    return(q)

def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97],1
    return(q)
 
def factors(n):
    q = []
    for i in range(1,int(n ** 0.5) + 1):
        if n % i == 0: q.append(i); q.append(n // i)
    return(list(sorted(list(set(q)))))
 
def prime_factors(n):
    q = []
    while n % 2 == 0: q.append(2); n = n // 2
    for i in range(3,int(n ** 0.5) + 1,2):
        while n % i == 0: q.append(i); n = n // i
    if n > 2: q.append(n)
    return(list(sorted(q)))

def transpose(a):
    b = [[0] * len(a) for i in range(len(a))]
    for i in range(len(a)): 
        for j in range(len(a)): 
            b[i][j] = a[j][i]
    return(b)


        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
    
    
main()

Solution (Python):
import sys
import math
import heapq
from collections import defaultdict, deque
from decimal import *
def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

ac=0;wa=0;tle=0;re=0
for _ in range(r()):
    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())

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

for i in range(n):
    s=input()
    if s=='AC':
        c0+=1
    elif s == 'WA':
        c1+=1
    elif s== 'TLE':
        c2+=1
    else:
        c3+=1

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

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

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

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

C = Counter(S)

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):
import sys
import math
import bisect

def main():
    d = dict()
    for _ in range(int(input())):
        s = input()
        if s not in d:
            d[s] = 0
        d[s] += 1
    A = ['AC', 'WA', 'TLE', 'RE']
    for a in A:
        if a not in d:
            d[a] = 0
        print('%s x %d' % (a, d[a]))

if __name__ == "__main__":
    main()

Solution (Python):
if __name__ == '__main__':
    n = int(input())
    ans = {}
    ans["AC"] = 0
    ans["WA"] = 0
    ans["TLE"] = 0
    ans["RE"] = 0

    for i in range(n):
        s = input()
        ans[s]+=1
    print("AC x " + str(ans["AC"]))
    print("WA x "+str(ans["WA"]))
    print("TLE x "+str(ans["TLE"]))
    print("RE x "+str(ans["RE"]))

Solution (Python):
import sys

from collections import defaultdict, deque, Counter










stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def solve():
    n = int(stdin.readline().rstrip())
    
    
    
    word = [stdin.readline().rstrip() for _ in range(n)]
    
    
    c = Counter(word)
    ac = c["AC"]
    wa = c["WA"]
    tle = c["TLE"]
    re = c["RE"]
    print("AC x "+str(ac))
    print("WA x "+str(wa))
    print("TLE x "+str(tle))
    print("RE x "+str(re))


if __name__ == '__main__':
    solve()

Solution (Python):
from collections import defaultdict

def t():
    return 0

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

for i in range(int(input())):
    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())
a = 0
w = 0
t = 0
r = 0
for i in range(N):
    S = input()
    if S == 'AC':
        a += 1
    if S == 'WA':
        w += 1
    if S == 'TLE':
        t += 1
    if S == '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 i in range(n):
    s=input()
    if s=='AC':
        ac+=1
    elif s=='WA':
        wa+=1
    elif s=='TLE':
        tle+=1
    else:
        re+=1
print('AC x '+str(ac))
print('WA x '+str(wa))
print('TLE x '+str(tle))
print('RE x '+str(re))

Solution (Python):
n = int(input())
A = 0
W = 0
T = 0
R = 0
for i in range(n):
  i = input()
  if i[0] == 'A':
    A += 1
  elif i[0] == 'W':
    W += 1
  elif i[0] == 'T':
    T += 1
  elif i[0] == 'R':
    R += 1
print('AC x {}'.format(A))
print('WA x {}'.format(W))
print('TLE x {}'.format(T))
print('RE x {}'.format(R))

Solution (Python):
n  = int(input())
rs = [ input() for _ in range(n) ]

print(f'AC x {rs.count("AC")}')
print(f'WA x {rs.count("WA")}')
print(f'TLE x {rs.count("TLE")}')
print(f'RE x {rs.count("RE")}')

Solution (Python):
from collections import Counter

N = int(input())

S = []
for _ in range(N):
    S.append(input())
dic = Counter(S)

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

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

Solution (Python):
import sys, math,os
from io import BytesIO, IOBase



from collections import defaultdict as dd, deque, Counter


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

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"])

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

Solution (Python):


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

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

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

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

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

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

Solution (Python):

import sys

sysread = sys.stdin.readline
read = sys.stdin.read
sys.setrecursionlimit(10 ** 7)










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

Solution (Python):




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

Solution (Python):
from collections import defaultdict
N = int(input())
d = defaultdict(int)
for i in range(N):
    S = input()
    d[S] += 1
print("AC x "+str(d["AC"]))
print("WA x "+str(d["WA"]))
print("TLE x "+str(d["TLE"]))
print("RE x "+str(d["RE"]))

Solution (Python):
n=int(input())
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]}')

Solution (Python):

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




main()

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

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

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

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

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

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

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

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

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

Solution (Python):
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"]}')

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

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

Solution (Python):



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}")

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

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

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

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

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

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