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())
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())
li = []
for _ in range(n):
  li.append(input())
print(f'AC x {li.count("AC")}')
print(f'WA x {li.count("WA")}')
print(f'TLE x {li.count("TLE")}')
print(f'RE x {li.count("RE")}')

Submission status: Accepted

Solution code:
from collections import Counter

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

c = Counter(S)
for i in ['AC', 'WA', 'TLE', 'RE']:
    print('{} x {}'.format(i, c[i]))

Submission status: Accepted

Solution code:
from collections import defaultdict

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

judge=["AC","WA","TLE","RE"]
for key in judge:
    print(key+" x "+str(cnt[key]))

Submission status: Accepted

Solution code:
from collections import defaultdict

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

d = defaultdict(int)
n = readInt()
for i in range(n):
	d[readChar()]+=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:
from collections import Counter
n = int(input())
arr = [input() for _ in range(n)]


c = Counter(arr)

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

for x in li:
    print("{} x {}".format(x, c[x]))

Submission status: Accepted

Solution code:
from collections import Counter

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

C = Counter(Ss)
for s in ["AC", "WA", "TLE", "RE"]:
    if not s in C:
        c = 0
    else:
        c = C[s]
    print("{} x {}".format(s, c))

Submission status: Accepted

Solution code:
from collections import defaultdict
def main():
    N = int(input())
    d = defaultdict(int)
    for _ in range(N):
        S = input()
        d[S] += 1

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



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
import collections
import bisect
from copy import copy


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

    for e in ans:
        print("{} x {}".format(e, ans[e]))


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):
    new = input()
    if new == "AC":
        AC += 1
    elif new == "WA":
        WA += 1
    elif new == "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 sys

def input():
    return sys.stdin.readline()[:-1]

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

for sc in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{sc} x {s_li.count(sc)}')

Submission status: Accepted

Solution code:
import sys
import math
def II():
	return int(sys.stdin.readline())

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

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

def SI():
	return sys.stdin.readline().strip()
n = II()
x = 0
y = 0
z = 0
k = 0
for q in range(n):
	s = SI()
	if s == "AC":
		x+=1
	elif s == "WA":
		y+=1
	elif s == "TLE":
		z+=1
	else:
		k+=1
print("AC x "+str(x))
print("WA x "+str(y))
print("TLE x "+str(z))
print("RE x "+str(k))

Submission status: Accepted

Solution code:
from collections import Counter

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

c = Counter(s)
print('AC x '+str(c['AC']))
print('WA x '+str(c['WA']))
print('TLE x '+str(c['TLE']))
print('RE x '+str(c['RE']))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
ret = {"AC":0,
       "WA":0,
       "TLE":0,
       "RE":0
       }
for i in range(n):
    s = input()
    ret[s]+=1

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

Submission status: Accepted

Solution code:
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

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:
#!/usr/bin/env python3
import sys
from collections import Counter as cl 

def solve(N: int, S: "List[str]"):
    state = ["AC", "WA", "TLE", "RE"]
    d = cl(S)
    for s in state:
        print(s + " x " + str(d[s]))
    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())
d = {"AC":0, "WA":0, "TLE":0, "RE":0}
for _ in range(n):
    s = input()
    d[s] += 1

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

Submission status: Accepted

Solution code:
N=int(input())
L=["AC","WA","TLE","RE"]
ANS=[0,0,0,0]

for i in range(N):
    s=input()
    for j in range(4):
        if s==L[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]))

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
s = []
for i in range(n):
    s.append(input())
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())


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

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


for status, count in dict.items():
    print(f"{status} x {count}")

Submission status: Accepted

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

for key in dct:
    print(f'{key} x {dct[key]}')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
counts = dict()
counts["AC"] = 0
counts["WA"] = 0
counts["TLE"] = 0
counts["RE"] = 0
for i in range(N):
    S = input()
    counts[S] += 1
    
stats = ["AC", "WA", "TLE", "RE"]
for e in stats:
    print(e + " x " + str(counts[e]))

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque, Counter, OrderedDict
import collections, heapq, itertools, bisect
import math, fractions
import sys, copy

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI1(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline().rstrip())
def LS(): return [list(x) for x in sys.stdin.readline().split()]
def S(): return list(sys.stdin.readline().rstrip())
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
dire = [[1, 0], [0, 1], [-1, 0], [0, -1]]
dire8 = [[1, 0], [1, 1], [0, 1], [-1, 1], [-1, 0], [-1, -1], [0, -1], [1, -1]]
MOD = 1000000007

def main():
    N = I()
    S = [input() for _ in range(N)]
    print(f'AC x {S.count("AC")}')
    print(f'WA x {S.count("WA")}')
    print(f'TLE x {S.count("TLE")}')
    print(f'RE x {S.count("RE")}')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
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
    elif s=="RE":
        d[3]+=1
print("AC x "+str(d[0]))
print("WA x "+str(d[1]))
print("TLE x "+str(d[2]))
print("RE x "+str(d[3]))

Submission status: Accepted

Solution code:
from collections import Counter

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

c = Counter(S)

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

Submission status: Accepted

Solution code:
#                          JAI SHREE RAM

import math; from collections import *
import sys; from functools import reduce

# sys.setrecursionlimit(10**6)
def get_ints(): return map(int, input().strip().split())
def get_list(): return list(get_ints())
def get_string(): return list(input().strip().split())
def printxsp(*args): return print(*args, end="")
def printsp(*args): return print(*args, end=" ")

UGLYMOD = int(1e9)+7; SEXYMOD = 998244353; MAXN = int(1e5)

# sys.stdin=open("input.txt","r");sys.stdout=open("output.txt","w")

# for _testcases_ in range(int(input())):
d = OrderedDict()
d['AC'] = 0
d['WA'] = 0
d['TLE'] = 0
d['RE'] = 0
n = int(input())
for i in range(n):
    d[input()] += 1
for key, val in d.items():
    print(key, 'x', val)

'''
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
THE LOGIC AND APPROACH IS MINE @luctivud ( UDIT GUPTA )
Link may be copy-pasted here if it's taken from other source.
DO NOT PLAGIARISE.
>>> COMMENT THE STDIN!! CHANGE ONLINE JUDGE !!
'''

Submission status: Accepted

Solution code:
import collections
N = int(input())
S = [input() for _ in range(N)]
C = collections.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']))

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
    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())
my_dict = dict()

for _ in range(n):
    tmp = input()
    if tmp in my_dict:
        my_dict[tmp] += 1
    else:
        my_dict[tmp] = 1

for item in ['AC', 'WA', 'TLE', 'RE']:
    if item in my_dict:
        print(item + ' x ' + str(my_dict[item]))
    else:
        print(item + ' x ' + str(0))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import Counter

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 19
MOD = 10 ** 9 + 7
EPS = 10 ** -10

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

C = Counter(S)
print('AC x {0}'.format(C['AC']))
print('WA x {0}'.format(C['WA']))
print('TLE x {0}'.format(C['TLE']))
print('RE x {0}'.format(C['RE']))

Submission status: Accepted

Solution code:
def main():
    import sys
    from collections import defaultdict
    input = sys.stdin.readline
    N = int(input())
    d = defaultdict(int)
    for n in range(N):
        d[input().strip()] += 1
    for s in ['AC', 'WA', 'TLE', 'RE']:
        print(s+' x', d[s])

if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

for s in S:
    if s == 'AC':
        AC += 1
    elif s == 'WA':
        WA += 1
    elif s == 'TLE':
        TLE += 1
    elif s == 'RE':
        RE += 1

print(f'AC x {AC}')
print(f'WA x {WA}')
print(f'TLE x {TLE}')
print(f'RE x {RE}')

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    import math
    #from math import gcd

    #inf = 10**17
    #mod = 10**9 + 7
    #epsilon = 10**-9

    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 {}'.format(a))
    print('WA x {}'.format(b))
    print('TLE x {}'.format(c))
    print('RE x {}'.format(d))

if __name__ == '__main__':
    main()

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):
    s = input()
    if s == "AC":
        n_ac += 1
    elif s == "WA":
        n_wa += 1
    elif s == "TLE":
        n_tle += 1
    else:
        n_re += 1

print("AC x",n_ac)
print("WA x",n_wa)
print("TLE x",n_tle)
print("RE x",n_re)

Submission status: Accepted

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

dic = collections.defaultdict(int)

for i in s:
    dic[i]+=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:
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

n=int(input())
a,b,c,d=0,0,0,0
for i in range(n):
    s=input()
    if s=="AC":
        a+=1
    elif s=="WA":
        b+=1
    elif s=="TLE":
        c+=1
    else:
        d+=1
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)

Submission status: Accepted

Solution code:
n = int(input())
d = {}
d['AC'] = 0
d['WA'] = 0
d['TLE'] = 0
d['RE'] = 0
for i in range(n):
    s = str(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())
a=[0,0,0,0]
b=['AC','WA','TLE','RE']
for i in range(n):
    s=input()
    a[b.index(s)]+=1
print('AC x '+str(a[0]))
print('WA x '+str(a[1]))
print('TLE x '+str(a[2]))
print('RE x '+str(a[3]))

Submission status: Accepted

Solution code:
N = int(input())

d = dict()
d['AC'] = 0
d['WA'] = 0
d['TLE'] = 0
d['RE'] = 0

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

a, b, c, d = 0, 0, 0, 0
for _ in range(N):
    s = input()
    if s == "AC":
        a += 1
    elif s == "WA":
        b += 1
    elif s == "TLE":
        c += 1
    elif s == "RE":
        d += 1


def f(s, x):
    print(s, "x", x)


f("AC", a)
f("WA", b)
f("TLE", c)
f("RE", d)

Submission status: Accepted

Solution code:
def main():
    from sys import setrecursionlimit, stdin, stderr
    from os import environ
    from collections import defaultdict, deque, Counter
    from math import ceil, floor
    from itertools import accumulate, combinations, combinations_with_replacement
    setrecursionlimit(10**6)
    dbg = (lambda *something: stderr.write("\033[92m{}\033[0m".format(str(something)+'\n'))) if 'TERM_PROGRAM' in environ else lambda *x: 0
    input = lambda: stdin.readline().rstrip()
    LMIIS = lambda: list(map(int,input().split()))
    II = lambda: int(input())
    P = 10**9+7
    INF = 10**18+10

    N = II()
    r = []
    for i in range(N):
        r.append(input())
    r = Counter(r)
    print('AC x',r['AC'])
    print('WA x',r['WA'])
    print('TLE x',r['TLE'])
    print('RE x',r['RE'])


    
main()

Submission status: Accepted

Solution code:
N=int(input())
l=["AC","WA","TLE","RE"]
a=[0,0,0,0]
for i in range(N):
    S=input()
    for j in range(4):
        if l[j]==S:
            a[j]+=1
            break
for i in range(4):
    print(f"{l[i]} x {a[i]}")

Submission status: Accepted

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

key = ["AC", "WA", "TLE", "RE"]
d = dict()
for x in key:
    d[x] = 0
for x in S:
    d[x] += 1

for x in key:
    print(x, "x", d[x])

Submission status: Accepted

Solution code:
n = int(input())

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


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

lst_ans = ['AC', 'WA', 'TLE', 'RE']
for i in lst_ans:
  print("{} x {}".format(i, lst[i]))

Submission status: Accepted

Solution code:
arr = [0, 0, 0, 0]
for _ in range(int(input())):
  s = input()
  arr[{"AC": 0, "WA": 1, "TLE": 2, "RE": 3}[s]] += 1
print("AC x", arr[0])
print("WA x", arr[1])
print("TLE x", arr[2])
print("RE x", arr[3])

Submission status: Accepted

Solution code:
import math  # noqa: F401
from collections import deque  # noqa: F401
from typing import Deque, Dict, List, Optional, Tuple, Union  # noqa: F401


def main(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
        elif s == "RE":
            re += 1

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


if __name__ == "__main__":
    N = int(input())
    S: List[str] = []
    for _ in range(N):
        S.append(input())
    main(N, S)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import*
c = Counter([input() for _ in [None]*int(input())])
for i in ["AC", "WA", "TLE", "RE"]:
    print(i, "x", c.get(i, 0))

Submission status: Accepted

Solution code:
from collections import Counter

N,*S = open(0).read().split()
sc = Counter(S)
print('AC x ' + str(sc['AC']))
print('WA x ' + str(sc['WA']))
print('TLE x ' + str(sc['TLE']))
print('RE x ' + str(sc['RE']))

Submission status: Accepted

Solution code:
N = int(input())
K = ['AC', 'WA', 'TLE', 'RE']
D = {k:0 for k in K}
for _ in range(N):
    D[input()]+=1

for k in K:
    print('{} x {}'.format(k, D[k]))

Submission status: Accepted

Solution code:
from collections import defaultdict
n = int(input())
s = [input() for i in range(n)]
d = defaultdict(int)
for si in s:
    d[si] += 1
print('AC x {}'.format(d['AC']))
print('WA x {}'.format(d['WA']))
print('TLE x {}'.format(d['TLE']))
print('RE x {}'.format(d['RE']))

Submission status: Accepted

Solution code:
import math
import fractions
import collections
import itertools
N=int(input())
l=[0]*4
for i in range(N):
    s=input()
    if s=="AC":
        l[0]=l[0]+1
    if s=="WA":
        l[1]=l[1]+1
    if s=="TLE":
        l[2]=l[2]+1
    if s=="RE":
        l[3]=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]))

Submission status: Accepted

Solution code:
n, *s = open(0).read().split()

from collections import Counter

c = Counter(s)

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

Submission status: Accepted

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

from collections import defaultdict

scores = defaultdict(int)

N = int(input())
for _ in range(N):
    S = input()
    assert(S in ['AC', 'WA', 'TLE', 'RE'])
    scores[S] += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def examA():
    N = I()
    ans = (10000 - N)%1000
    print(ans)
    return

def examB():
    T = ["AC","WA","TLE","RE"]
    N = I()
    S = [SI()for _ in range(N)]

    ans = [0]*4
    for s in S:
        for i in range(4):
            if s==T[i]:
                ans[i] += 1
                break
    for i in range(4):
        print(T[i]+" x "+str(ans[i]))
    return

def examC():
    ans = 0
    print(ans)
    return

def examD():
    ans = 0
    print(ans)
    return

def examE():
    ans = 0
    print(ans)
    return

def examF():
    ans = 0
    print(ans)
    return

from decimal import getcontext,Decimal as dec
import sys,bisect,itertools,heapq,math,random
from copy import deepcopy
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
def I(): return int(input())
def LI(): return list(map(int,sys.stdin.readline().split()))
def DI(): return dec(input())
def LDI(): return list(map(dec,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
global mod,mod2,inf,alphabet,_ep
mod = 10**9 + 7
mod2 = 998244353
inf = 10**18
_ep = dec("0.000000000001")
alphabet = [chr(ord('a') + i) for i in range(26)]
alphabet_convert = {chr(ord('a') + i): i for i in range(26)}

getcontext().prec = 28

sys.setrecursionlimit(10**7)

if __name__ == '__main__':
    examB()

"""
142
12 9 1445 0 1
asd dfg hj o o
aidn
"""

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
    if s == 'WA': wa += 1
    if s == 'TLE': tle += 1
    if s == '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())
d = {'AC':0,'WA':0,'TLE':0,'RE':0}
S = [input() for _ in range(N)]
for i in range(N):
    d[S[i]] += 1

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

Submission status: Accepted

Solution code:
def main():
    count = int(input())
    array = [input() for _ in range(count)]
    names = ['AC', 'WA', 'TLE', 'RE']
    for name in names:
        print(f'{name} x {array.count(name)}')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a=0
b=0
c=0
d=0
N=int(input())
for i in range(N):
  S=input()
  if S=="AC":
    a+=1
  elif S=="WA":
    b+=1
  elif S=="TLE":
    c+=1
  elif S=="RE":
    d+=1
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:
import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())

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

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:
# Template 1.0
import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
dd= defaultdict(int)
for _ in range(n):
    dd[input()]+=1

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

Submission status: Accepted

Solution code:
n = int(input())
d = {}
d['AC'] = 0
d['WA'] = 0
d['TLE'] = 0
d['RE'] = 0

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:
#!/usr/bin/env python3
import sys
input = sys.stdin.readline

n = int(input())
ac = 0; wa = 0; tle = 0; re = 0
for _ in range(n):
    s = input().rstrip()
    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())
d={'AC':0,'WA':0,'TLE':0,'RE':0}
for _ in range(n):
  d[input()]+=1
print('AC x',d['AC'])
print('WA x',d['WA'])
print('TLE x',d['TLE'])
print('RE x',d['RE'])

Submission status: Accepted

Solution code:
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

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

Submission status: Accepted

Solution code:
from collections import Counter

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

C = Counter(S)

for i in ["AC","WA","TLE","RE"]:
    print(i,"x",C[i])

Submission status: Accepted

Solution code:
from collections import *
n = int(input())
a = []
for i in range(n):
	a.append(input())
c = Counter(a)
for i in ['AC', 'WA', 'TLE', 'RE']:
	if(i not in c): c[i] = 0
	print(i,'x',c[i])

Submission status: Accepted

Solution code:

N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(N):
    s = input().strip()
    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))

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    dic = {}
    dic["AC"] = 0
    dic["WA"] = 0
    dic["TLE"] = 0
    dic["RE"] = 0
    for _ 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"])

if __name__ == "__main__":
    main()

Submission status: Accepted

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


ans = ["AC","WA", "TLE", "RE"]
cnt =[0] * 4

for i in range(n):
  cnt[ans.index(s[i])] += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

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

#処理内容
def main():
	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"]))



if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
# @author 

import sys

class BJudgeStatusSummary:
    def solve(self, tc=0):
        n = int(input())
        a = ['AC', 'WA', 'TLE', 'RE']
        d = {x: 0 for x in a}
        for i in range(n):
            line = input().strip()
            d[line] += 1
        
        for x in a:
            print("{} x {}".format(x, d[x]))
            




solver = BJudgeStatusSummary()
input = sys.stdin.readline

solver.solve()