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:
from sys import stdin
from sys import setrecursionlimit
import math
setrecursionlimit(10 ** 7)

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

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

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:
import bisect
import sys
import math
from collections import deque
from heapq import heappush, heappop

def sRaw():
    return input().rstrip("\r")


def iRaw():
    return int(input())


def ssRaw():
    return input().split()


def isRaw():
    return list(map(int, ssRaw()))


INF = 1 << 29

#DIV = (10**9) + 7
DIV = 998244353

def mod_inv_prime(a, mod=DIV):
    return pow(a, mod-2, mod)


def mod_inv(a, b):
    r = a
    w = b
    u = 1
    v = 0
    while w != 0:
        t = r//w
        r -= t*w
        r, w = w, r
        u -= t*v
        u, v = v, u
    return (u % b+b) % b


def CONV_TBL(max, mod=DIV):
    fac, finv, inv = [0]*max, [0]*max, [0]*max
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2, max):
        fac[i] = fac[i-1]*i % mod
        inv[i] = mod - inv[mod % i] * (mod//i) % mod
        finv[i] = finv[i-1]*inv[i] % mod

    class CONV:
        def __init__(self):
            self.fac = fac
            self.finv = finv
            pass

        def ncr(self, n, k):
            if(n < k):
                return 0
            if(n < 0 or k < 0):
                return 0
            return fac[n]*(finv[k]*finv[n-k] % DIV) % DIV

    return CONV()


def cumsum(As):
    s = 0
    for a in As:
        s += a
        yield s


sys.setrecursionlimit(200005)


def dijkstra(G,start=0):
    heap = []
    cost = [INF]*len(G)
    heappush(heap,(0,start))
    while len(heap)!=0:
        c,n = heappop(heap)
        if cost[n] !=INF:
            continue
        cost[n]=c
        for e in G[n]:
            ec,v = e
            if cost[v]!=INF:
                continue
            heappush(heap,(ec+c,v))
    return cost


def main():
    N= iRaw()
    d= {}
    ks=["AC", "WA", "TLE", "RE"]
    for k in ks:
        d[k]=0
    for _ in range(N):
        s = sRaw()
        if s not in d:
            d[s]=0
        else:
            d[s]+=1
    for k in ks:
        print(k,"x",d[k])
main()

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    verdicts = ['AC','WA','TLE','RE']
    count = [0]*4
    for i in range(n):
        s = input()
        count[verdicts.index(s)] += 1

    for i in range(4):
        print(verdicts[i],'x',count[i])

        

main()

Submission status: Accepted

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


def solve(N: int, S: "List[str]"):
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for s in S:
        if s == "AC":
            ac += 1
        elif s == "WA":
            wa += 1
        elif s == "TLE":
            tle += 1
        else:
            re += 1
    print("AC x {0}".format(ac))
    print("WA x {0}".format(wa))
    print("TLE x {0}".format(tle))
    print("RE x {0}".format(re))
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [next(tokens) for _ in range(N)]  # type: "List[str]"
    solve(N, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(n):
  hoge = input()
  if hoge == "AC":
    ac += 1
  elif hoge == "WA":
    wa += 1
  elif hoge == "TLE":
    tle += 1
  elif hoge == "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())
s = [input() for _ in range(n)]

ac = 0
wa = 0
tle = 0
re = 0
for si in s:
    if si == "AC":
        ac += 1
    elif si == "WA":
        wa += 1
    elif si == "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:
from math import gcd

from math import factorial as f

from math import ceil, floor, sqrt
import math

import bisect
import re
import heapq

from copy import deepcopy
import itertools
from itertools import permutations

from sys import exit

ii = lambda: int(input())
mi = lambda: map(int, input().split())
li = lambda: list(map(int, input().split()))

yes = "Yes"
no = "No"


def main():
    res = ['AC', 'WA', 'TLE', 'RE']
    n = ii()
    ans = [0 for i in range(4)]
    for i in range(n):
        tmp = input()
        for j in range(4):
            if tmp == res[j]:
                ans[j] += 1

    print('AC x ' + str(ans[0]))
    print('WA x ' + str(ans[1]))
    print('TLE x ' + str(ans[2]))
    print('RE x ' + str(ans[3]))


main()

Submission status: Accepted

Solution code:
from collections import Counter


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    N = read_int()
    counter = Counter()
    for _ in range(N):
        counter[input().strip()] += 1
    for verdict in ['AC', 'WA', 'TLE', 'RE']:
        print(f'{verdict} x {counter[verdict]}')


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n = ri()
li = [rr() for _ in range(n)]
a = 0
b = 0
c = 0
d = 0
for i in li:
  if i == 'AC':
    a += 1
  elif i == 'TLE':
    b += 1
  elif i == 'RE':
    c += 1
  else:
    d += 1
print(f'AC x {a}')
print(f'WA x {d}')
print(f'TLE x {b}')
print(f'RE x {c}')

Submission status: Accepted

Solution code:
N = int(input())
c = [0, 0, 0, 0]
for k in range(N):
    s = input()
    if s == 'AC':
        c[0] +=1
    elif s == 'WA':
        c[1] +=1
    elif s == 'TLE':
        c[2] +=1
    else:
        c[3] +=1

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
import math
from math import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations, chain
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    # 10**6
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     # 10**6
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp

#

class UnionFindEx:
    def __init__(self, size):
        #正なら根の番号、負ならグループサイズ
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   #負なら根
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    #サイズ更新
        self.roots[r2] = r1
        return True

Yes = 'Yes'
No = 'No'


def main():
    d = defaultdict(int)
    for _ in range(ii()):
        d[input()] += 1
    for a in ('AC', 'WA', 'TLE', 'RE'):
        print(a, 'x', d[a])





main()

Submission status: Accepted

Solution code:
N = int(input())
num = [0,0,0,0]
# AC, WA, TLE, RE
for i in range(N):
  S = input()
  if(S == "AC"):
    num[0] += 1
  elif(S == "WA"):
    num[1] += 1
  elif(S == "TLE"):
    num[2] += 1
  else:
    num[3] += 1

print("AC x %d"%num[0])
print("WA x %d"%num[1])
print("TLE x %d"%num[2])
print("RE x %d"%num[3])

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

n = int(input())
#b = list(map(int, input().split()))
#n, m = map(int, input().split())
#s = input()
#s,t = input().split()
s = [input() for _ in range(n)]
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

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

for i in s:
    d[i] = d.get(i,0) + 1

for k,v in d.items():
    print(k+' x '+str(v))

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 "+str(dic["AC"]))
print("WA x "+str(dic["WA"]))
print("TLE x "+str(dic["TLE"]))
print("RE x "+str(dic["RE"]))

Submission status: Accepted

Solution code:
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(f"AC x {c0}")
print(f"WA x {c1}")
print(f"TLE x {c2}")
print(f"RE x {c3}")

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

Submission status: Accepted

Solution code:
n=int(input())

lis=[0,0,0,0]

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

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

Submission status: Accepted

Solution code:
# coding: utf-8


def main():
    N = int(input())
    S = [None] * N
    for i in range(N):
        S[i] = input()

    a, b, c, d = "AC", "WA", "TLE", "RE"
    dic = {x: 0 for x in [a, b, c, d]}

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

    for k, v in dic.items():
        print(f"{k} x {v}")


main()

Submission status: Accepted

Solution code:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
#     combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<50

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

def main():
    n = int(input())
    ans = {'AC':0,'WA':0,'TLE':0,'RE':0}
    for i in range(n):
        s = input()
        ans[s] += 1
    print('AC x',ans['AC'])
    print('WA x',ans['WA'])
    print('TLE x',ans['TLE'])
    print('RE x',ans['RE'])
    return

if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = int(input())

a, b, c, d = 0, 0, 0, 0

for _ in range(N):
    S = input().rstrip()
    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)

Submission status: Accepted

Solution code:
n = int(input())
res = []

for _ in range(n):
    res.append(input())
    
print('AC x', res.count('AC'))
print('WA x', res.count('WA'))
print('TLE x', res.count('TLE'))
print('RE x', res.count('RE'))

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 i,j in count.items():
    print(i + " x " +str(j))

Submission status: Accepted

Solution code:

def main():
  n = int(input())

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

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

  for k, c in D.items():
    print(f"{k} x {c}")


main()

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    dict = defaultdict(int)
    dict['AC'] = 0
    dict['WA'] = 0
    dict['TLE'] = 0
    dict['RE'] = 0

    for n in range(N):
        S = iss()
        dict[S] += 1

    print('AC x', dict['AC'])
    print('WA x', dict['WA'])
    print('TLE x', dict['TLE'])
    print('RE x', dict['RE'])


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

nAC = s.count("AC")
nWA = s.count("WA")
nTLE = s.count("TLE")
nRE = s.count("RE")

print("AC x", nAC)
print("WA x", nWA)
print("TLE x", nTLE)
print("RE x", nRE)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(n):
    data = input()
    if data == 'AC':
        AC += 1
    elif data == 'WA':
        WA += 1
    elif data == 'TLE':
        TLE += 1
    elif data == 'RE':
        RE += 1

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

Submission status: Accepted

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


def solve(N: int, S: "List[str]"):
    result = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    for s in S:
        result[s] += 1
    print('AC x %d' % result['AC'])
    print('WA x %d' % result['WA'])
    print('TLE x %d' % result['TLE'])
    print('RE x %d' % result['RE'])
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [next(tokens) for _ in range(N)]  # type: "List[str]"
    solve(N, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
a=[input() for i in range(n)]
print('AC','x',str(a.count('AC')))
print('WA','x',str(a.count('WA')))
print('TLE','x',str(a.count('TLE')))
print('RE','x',str(a.count('RE')))

Submission status: Accepted

Solution code:
n = int(input())
a = 0
w = 0
t = 0
r = 0
l = []
for i in range(n):
    l.append(input())

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

Submission status: Accepted

Solution code:
# import time
# t1=time.time()
def LI():return list(map(int,input().split()))
def I(): return int(input())
from collections import deque, Counter, defaultdict
from heapq import heappop, heappush
# from pprint import pprint
# import numpy as np

n=I()
s=[input() for _ in range(n)]
sc=Counter(s)
print("AC x {}".format(sc["AC"]))
print("WA x {}".format(sc["WA"]))
print("TLE x {}".format(sc["TLE"]))
print("RE x {}".format(sc["RE"]))

Submission status: Accepted

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

Ans = [0] * 4

for s in S:
    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', Ans[0])
print('WA x', Ans[1])
print('TLE x', Ans[2])
print('RE x', Ans[3])

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    from collections import Counter
    n = int(readline())
    cnt = Counter()
    for i in range(n):
        s = input()
        cnt[s] += 1

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
N=int(input())

ans_dic=defaultdict(int)
for _ in range(N):
  s=input()
  ans_dic[s]+=1

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

for s in ["AC", "WA", "TLE", "RE"]:
    print(s, " x ", ans[s])

Submission status: Accepted

Solution code:
def main():
    from collections import Counter
    n = int(input())
    s = []
    for i in range(n):
        t = input()
        s.append(t)

    c = Counter(s)

    for t in ['AC','WA','TLE','RE']:
        print(t,'x',c[t])



main()

Submission status: Accepted

Solution code:
#

import sys
input=sys.stdin.readline

def main():
    N=int(input())
    r=["AC","WA","TLE","RE"]
    c=[0]*4
    for i in range(N):
        s=input().strip("\n")
        c[r.index(s)]+=1
    for i in range(4):
        print(r[i],"x",c[i])
    
    
    
if __name__=="__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

li = ["AC","WA", "TLE" , "RE"]
ans = [0 for _ in range(4)]

for i in range(N):
    S = input()
    for j in range(4):
        if li[j]==S:
            ans[j] += 1

for i in range(4):
    print("{} x {}".format(li[i], ans[i]))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import Counter


def read():
    N = int(input().strip())
    S = []
    for i in range(N):
        s = input().strip()
        S.append(s)
    return N, S


def solve(N, S):
    AC = "AC"
    WA = "WA"
    TLE = "TLE"
    RE = "RE"
    D = Counter(S)
    print(AC , "x", D[AC])
    print(WA , "x", D[WA])
    print(TLE , "x", D[TLE])
    print(RE , "x", D[RE])


if __name__ == '__main__':
    inputs = read()
    outputs = solve(*inputs)
    if outputs is not None:
        print("%s" % str(outputs))

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
A = []
for _ in range(N):
  A.append(input())
  
C = Counter(A)

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:
N = int(input())
A = [input() for _ in range(N)]

print('AC x {}'.format(len([x for x in A if x == 'AC'])))
print('WA x {}'.format(len([x for x in A if x == 'WA'])))
print('TLE x {}'.format(len([x for x in A if x == 'TLE'])))
print('RE x {}'.format(len([x for x in A if x == 'RE'])))

Submission status: Accepted

Solution code:
n = int(input())
d = [0]*4
for _ in range(n):
    s = input()
    if s == 'AC':
        d[0] += 1
    elif s == 'WA':
        d[1] += 1
    elif s == 'TLE':
        d[2] += 1
    else:
        d[3] += 1
print(f"AC x {d[0]}")
print(f"WA x {d[1]}")
print(f"TLE x {d[2]}")
print(f"RE x {d[3]}")

Submission status: Accepted

Solution code:

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

N = int(input())
for i in range(N):
  c[input().strip()] += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
d={'AC':0,'WA':0,'TLE':0,'RE':0}
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']))

Submission status: Accepted

Solution code:
N = int(input())
s = []
for _ in range(N):
    s.append(input().strip())

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

for c in s:
    if c == 'AC':
        ac += 1
    elif c == 'WA':
        wa += 1
    elif c == 'TLE':
        tle += 1
    elif c == 'RE':
        re += 1

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

Submission status: Accepted

Solution code:
N = int(input())
dic = {one:0 for one in ['AC', 'WA', 'TLE', 'RE']}
for _ in range(N):
    dic[input()]+=1
    
for key in ['AC', 'WA', 'TLE', 'RE']:
    print(key, 'x', dic[key])

Submission status: Accepted

Solution code:
n=int(input())
s=[input() for i in range(n)]
ct=[0]*4
for i in range(n):
  if s[i]=='AC':
    ct[0]+=1
  elif s[i]=='WA':
    ct[1]+=1
  elif s[i]=='TLE':
    ct[2]+=1
  else:
    ct[3]+=1
a1=['AC','x',str(ct[0])]
a2=['WA','x',str(ct[1])]
a3=['TLE','x',str(ct[2])]
a4=['RE','x',str(ct[3])]
print(' '.join(a1))
print(' '.join(a2))
print(' '.join(a3))
print(' '.join(a4))

Submission status: Accepted

Solution code:
import sys
from collections import Counter

def read_int():
    line = sys.stdin.readline().rstrip('\n')
    return int(line)

def read_int_list():
    line = sys.stdin.readline().rstrip('\n')
    return [int(e) for e in line.split(' ')]

N = read_int()
subs = []
for _ in range(N):
    subs.append(sys.stdin.readline().rstrip('\n'))

c = Counter(subs)

for type in ['AC', 'WA', 'TLE', 'RE']:
    print(type + ' x ' + str(c[type]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

from collections import defaultdict

d = defaultdict(int)

for _ in range(n):
    s = input()
    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)]
from collections import Counter
c=Counter(s)
print("AC","x",c["AC"])
print("WA","x",c["WA"])
print("TLE","x",c["TLE"])
print("RE","x",c["RE"])

Submission status: Accepted

Solution code:
N = int(input())

d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(N):
    s = str(input())
    d[s] += 1

for key, value in d.items():
    print(f'{key} x {value}')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
cnt = Counter(S)
print("AC x {}".format(cnt['AC']))
print("WA x {}".format(cnt['WA']))
print("TLE x {}".format(cnt['TLE']))
print("RE x {}".format(cnt['RE']))

Submission status: Accepted

Solution code:
from collections import Counter 

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

print('AC x', s['AC'])
print('WA x', s['WA'])
print('TLE x', s['TLE'])
print('RE x', s['RE'])

Submission status: Accepted

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

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

Submission status: Accepted

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

for r in ['AC', 'WA', 'TLE', 'RE']:
    print('{} x {}'.format(r, S.count(r)))

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
ct = Counter([input() for _ in range(N)])
print('AC x ' + str(ct['AC']))
print('WA x ' + str(ct['WA']))
print('TLE x ' + str(ct['TLE']))
print('RE x ' + str(ct['RE']))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
stdin = sys.stdin


def ni(): return int(ns())


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


def naa(N): return [na() for _ in range(N)]


def ns(): return stdin.readline().rstrip()  # ignore trailing spaces

N = ni()
status = ["AC","WA","TLE","RE"]
cnt = [0,0,0,0]
for _ in range(N):
    s = ns()
    for i in range(4):
        if s == status[i]:
            cnt[i] += 1


for i in range(4):
    print(status[i] + " x " + str(cnt[i]))

Submission status: Accepted

Solution code:
N = int(input())
ans = {"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(N):
    state = input()
    ans[state] += 1
for key,val in ans.items():
    print(f"{key} x {val}")

Submission status: Accepted

Solution code:
from collections import Counter

import sys
input = sys.stdin.readline

N = int(input())

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

cc = Counter(S)

for v in ('AC', 'WA', 'TLE', 'RE'):
    print('{} x {}'.format(v, cc[v]))

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
from itertools import accumulate
from collections import deque
from math import sqrt
from collections import defaultdict
def main():
    n = int(input())
    cnt = defaultdict(int)
    for _ in range(n):
        s = input()
        cnt[s] += 1
    print('AC x ', end='')
    print(cnt['AC'])
    print('WA x ', end='')
    print(cnt['WA'])
    print('TLE x ', end='')
    print(cnt['TLE'])
    print('RE x ', end='')
    print(cnt['RE'])
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    n = gete(int)
    s = []
    for _ in range(n):
        s.append(gete())

    c = Counter(s)

    for v in ['AC', 'WA', 'TLE', 'RE']:
        print(v, "x", c[v])


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict
dic = defaultdict(lambda:0)

N = int(input())

for _ 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']))

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(str(input()))
from collections import Counter

c = Counter(S)
print('AC x',c['AC'])
print('WA x',c['WA'])
print('TLE x',c['TLE'])
print('RE x',c['RE'])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys
import collections
from decimal import Decimal # 10進数で考慮できる

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

d = collections.deque()
def LI(): return list(map(int, sys.stdin.readline().split()))

N = int(input())
S = [0 for i in range(N)]
ans = {
    "AC":0,
    "WA":0,
    "TLE":0,
    "RE":0
}
for i in range(N):
    S[i] = str(input())
    ans[S[i]] += 1

for key in ans.keys():
    print(key + " x " + str(ans[key]))