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:
cand = ["AC", 'WA', 'TLE', "RE"]
res_map = {}
for c in cand:
    res_map[c] = 0

N = int(input())
for _ in range(N):
    s = input()
    res_map[s] += 1
for c in cand:
    print("{} x {}".format(c, res_map[c]))

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

N = ri()
S = []
for i in range(N):
	S.append(rs())

import collections
h = collections.defaultdict(int)
for s in S:
	h[s] += 1
for key in ['AC', 'WA', 'TLE', 'RE']:
	print('{} x {}'.format(key, h[key]))

Submission status: Accepted

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

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

Submission status: Accepted

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

b = Counter(s)
print("AC x",b["AC"])
print("WA x",b["WA"])
print("TLE x",b["TLE"])
print("RE x",b["RE"])

Submission status: Accepted

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

C = ['AC', 'WA', 'TLE', 'RE']
for c in C:
    print(c, 'x', S.count(c))

Submission status: Accepted

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

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

Submission status: Accepted

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

a,b,c,d=0,0,0,0
for i in S:
    if i=="AC":a +=1
    elif i=="WA":b +=1
    elif i=="TLE":c +=1
    else:d +=1
print("AC x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
c = Counter(input() for _ in range(n))
for jr in ('AC', 'WA', 'TLE', 'RE'):
    print(jr, 'x', c[jr])

Submission status: Accepted

Solution code:
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

print(f"AC x {len(list(filter(lambda x: x == 'AC', A)))}")
print(f"WA x {len(list(filter(lambda x: x == 'WA', A)))}")
print(f"TLE x {len(list(filter(lambda x: x == 'TLE', A)))}")
print(f"RE x {len(list(filter(lambda x: x == 'RE', A)))}")

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    A = [input() for i in range(N)]
    from collections import Counter
    c = Counter(A)
    print("AC x", c["AC"])
    print("WA x", c["WA"])
    print("TLE x", c["TLE"])
    print("RE x", c["RE"])


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Contest No.: ABC173
# Problem No.: B
# Solver:      JEMINI
# Date:        20200705

import sys
import heapq

def main():
    n = int(input())
    a, b, c, d = 0, 0, 0, 0

    for i in range(n):
        temp = input()
        if temp == "AC":
            a += 1
        elif temp == "WA":
            b += 1
        elif temp == "TLE":
            c += 1
        else:
            d += 1

    print("AC x", a)
    print("WA x", b)
    print("TLE x", c)
    print("RE x", d)
    return

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
from collections import Counter

sys.setrecursionlimit(10 ** 7)

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

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

Submission status: Accepted

Solution code:
import bisect
import copy
import heapq
import math
import sys
from collections import *
from functools import lru_cache
from itertools import accumulate, combinations, permutations, product
def input():
    return sys.stdin.readline()[:-1]
def ruiseki(lst):
    return [0]+list(accumulate(lst))
sys.setrecursionlimit(500000)
mod=pow(10,9)+7
al=[chr(ord('a') + i) for i in range(26)]
direction=[[1,0],[0,1],[-1,0],[0,-1]]

n=int(input())
s=[input() for i in range(n)]
dic=defaultdict(int)

for i in range(n):
    dic[s[i]]+=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"]))
# AC x 3
# WA x 1
# TLE x 2
# RE x 0

Submission status: Accepted

Solution code:
N = int(input())
a = 0
b = 0
c = 0
d = 0
for i in range(N):
  temp = str(input())
  if temp == "AC":
    a += 1
  elif temp == "WA":
    b +=1
  elif temp == "TLE":
    c += 1
  else:
    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:
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 {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))

Submission status: Accepted

Solution code:
import sys
from collections import Counter
input = sys.stdin.readline
N = int(input())
c = Counter()
for _ in range(N): c[input()[: -1]] += 1
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:
import collections
n = int(raw_input())
cc = collections.Counter([raw_input() for _ in range(n)])

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines

n = int(readline())
a = read().split()

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

Submission status: Accepted

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

for s in ["AC", "WA", "TLE", "RE"]:
  print("%s x %s"%(s, S.count(s)))

Submission status: Accepted

Solution code:
from collections import defaultdict

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

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

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:
d = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
n = int(input())
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:
N = int(input())
table = {
	"AC": 0,
	"WA": 0,
	"TLE": 0,
	"RE" : 0,
}
for _ in range(N):
	table[input().strip()] += 1

for name in ("AC", "WA", "TLE", "RE"):
	print(name, "x", table[name])

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())
A=0
B=0
C=0
D=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:
def main():
    from collections import Counter as ct
    n = int(input())
    s = ct([input() for _ in [0]*n])
    for i in ["AC", "WA", "TLE", "RE"]:
        if i not in s:
            a = 0
        else:
            a = s[i]
        print(i, "x", a)


main()

Submission status: Accepted

Solution code:
(N, ) = [int(n) for n in input().split()]
A = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

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

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

Submission status: Accepted

Solution code:
import sys
from collections import Counter

n = int(input())
results = [input() for _ in range(n)]
cnt = Counter(results)
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 i in range(n)]
print("AC x", s.count("AC"))
print("WA x", s.count("WA"))
print("TLE x", s.count("TLE"))
print("RE x", s.count("RE"))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import sys
read = sys.stdin.read
readline = sys.stdin.readline

from collections import Counter

n, = map(int,readline().split())
d = Counter(read().split())

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

Submission status: Accepted

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

cnt = {}
for i, Si in enumerate(S):
    cnt.setdefault(Si, 0)
    cnt[Si] += 1

for key in ('AC', 'WA', 'TLE', 'RE'):
    cnt.setdefault(key, 0)
    ans = '{0} x {1}'.format(key, cnt[key])
    print(ans)

Submission status: Accepted

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

for ret in ['AC', 'WA', 'TLE', 'RE'] :
  print(ret, 'x', S.count(ret))

Submission status: Accepted

Solution code:
import sys
input=lambda: sys.stdin.readline().rstrip()
n=int(input())
import collections
D=collections.defaultdict(int)
for _ in range(n):
  D[input()]+=1
A=["AC","WA","TLE","RE"]
for a in A:
  print(a+" x "+str(D[a]))

Submission status: Accepted

Solution code:
from collections import Counter
n=int(input())
a = [input() for i in range(n)]
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())
s=[]
for i in range(n):
    s.append(input())
for j in ['AC','WA','TLE','RE']:
    print(j+' x '+str(s.count(j)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter


def main():
    N = int(input())
    S = [input() for _ in range(N)]
    d = Counter(S)
    for status in ['AC', 'WA', 'TLE', 'RE']:
        print('{} x {}'.format(status, d[status]))



if __name__ == '__main__':
    main()

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
    else:
        r+=1
print("AC","x",a)
print("WA","x",w)
print("TLE","x",t)
print("RE","x",r)

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
ac, wa, tle, re = 0, 0, 0, 0

for _ in range(N):
    s = input()[:-1]
    
    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:
from collections import Counter
n = int(input())
A = [input() for _ in range(n)]
cnt = Counter(A)
ans_list = ['AC', 'WA', 'TLE', 'RE']
for a in ans_list:
    print(a, 'x', cnt[a])

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
s = [None] * n
for i in range(n):
    s[i] = input().rstrip()
c = Counter(s)
for x in ['AC', 'WA', 'TLE', 'RE']:
    print('{} x {}'.format(x, c[x]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#import math

n=int(input())

d=dict()
for k in ['AC','WA','TLE','RE']:
    d[k]=0

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

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

Submission status: Accepted

Solution code:
import math
from functools import reduce
from collections import deque, defaultdict
import sys
sys.setrecursionlimit(10**7)

def input():
    return sys.stdin.readline().strip()

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行またはスペース区切りの入力をすべて読み込んでイテレータを返します。
def get_all_int():
    return map(int, open(0).read().split())

def log(*args):
    print("DEBUG:", *args, file=sys.stderr)

def main():
    INF = 999999999999999999999999
    MOD = 10**9+7

    n = int(input())
    d = defaultdict(int)
    for i in range(n):
        s = input()
        d[s] += 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"]))

main()

Submission status: Accepted

Solution code:
import collections

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

counter = collections.Counter(S)
for key in ('AC', 'WA', 'TLE', 'RE'):
    print('{} x {}'.format(key, counter.get(key, 0)))

Submission status: Accepted

Solution code:
import collections
import itertools

def main():
    dd = collections.defaultdict(int)
    n = int(input())
    dd = {"AC":0, "WA":0, "TLE":0, "RE":0}

    for i in range(n):
        s = input()
        dd[s]+=1
    for i in dd.keys():
        print(i, "x",dd[i])

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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
    else:
        re+=1
print('AC'+' x '+str(ac))
print('WA'+' x '+str(wa))
print('TLE'+' x '+str(tle))
print('RE'+' x '+str(re))

Submission status: Accepted

Solution code:
import collections
N = int(input())
S = collections.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:
import sys
input = sys.stdin.readline

N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    s = input().strip()
    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:
import sys
input = sys.stdin.readline

N = int(input())
S = [input().rstrip() for _ in range(N)]
cnt = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for s in S:
    cnt[s] += 1
for s in ['AC', 'WA', 'TLE', 'RE']:
    print('{} x {}'.format(s, cnt[s]))

Submission status: Accepted

Solution code:
N = int(input())
cnt=[0]*4
for i in range(N):
    S = input()
    if S=="AC":
        cnt[0]+=1
    elif S=="WA":
        cnt[1]+=1
    elif S=="TLE":
        cnt[2]+=1
    elif S=="RE":
        cnt[3]+=1
print("AC x " + str(cnt[0]))
print("WA x " + str(cnt[1]))
print("TLE x " + str(cnt[2]))
print("RE x " + str(cnt[3]))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10000000)
MOD = 10 ** 9 + 7
INF = 10 ** 15

def main():
	N = int(input())
	cnt = [0] * 4
	for _ in range(N):
		s = input()
		if s == 'AC':
			cnt[0] += 1
		elif s == 'WA':
			cnt[1] += 1
		elif s == 'TLE':
			cnt[2] += 1
		else:
			cnt[3] += 1
	print('AC x',cnt[0])
	print('WA x',cnt[1])
	print('TLE x',cnt[2])
	print('RE x',cnt[3])
if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
def main():
    from collections import Counter
    import sys
    input = sys.stdin.readline

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

    ctr = Counter(S)

    for target in ('AC', 'WA', 'TLE', 'RE'):
        print(target, 'x', ctr[target])


if __name__ == '__main__':
    main()

# import sys
# input = sys.stdin.readline
# 
# sys.setrecursionlimit(10 ** 7)
# 
# (int(x)-1 for x in input().split())
# rstrip()
#
# def binary_search(*, ok, ng, func):
#     while abs(ok - ng) > 1:
#         mid = (ok + ng) // 2
#         if func(mid):
#             ok = mid
#         else:
#             ng = mid
#     return ok

Submission status: Accepted

Solution code:
n = int(input())
ans = [0,0,0,0]
for _ in range(n):
  s = input()
  if s == 'AC':
    ans[0] += 1
  elif s == 'WA':
    ans[1] += 1
  elif s == 'TLE':
    ans[2] += 1
  else:
    ans[3] += 1
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 defaultdict

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

kotae = ["AC", "WA", "TLE", "RE"]
for i in range(4):
    k = kotae[i]
    print(str(k) + " x " + str(jisho[k]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
status = [input() for _ in range(N)]
C = Counter(status)
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:
from collections import Counter
N = int(input())
S = [input() for i in range(N)]
counter = Counter(S)
print("AC","x",counter["AC"])
print("WA","x",counter["WA"])
print("TLE","x",counter["TLE"])
print("RE","x",counter["RE"])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(500000)

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

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

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]


def main():
    N = ii()
    S = [input() for i in range(N)]
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for i in range(N):
        if S[i] == 'AC':
            ac += 1
        if S[i] == 'TLE':
            tle += 1
        if S[i] == 'WA':
            wa += 1
        if S[i] == '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:
import sys
def input(): return sys.stdin.readline().strip()


def main():
    N = int(input())
    dict = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    for _ in range(N):
        c = input()
        dict[c] += 1
    print("AC x {}".format(dict['AC']))
    print("WA x {}".format(dict['WA']))
    print("TLE x {}".format(dict['TLE']))
    print("RE x {}".format(dict['RE']))



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for i in range(N)]
a = w = t = r = 0
for s in S:
    c = s[0]
    if c=='A':
        a += 1
    elif c=='W':
        w += 1
    elif c=='T':
        t += 1
    else:
        r += 1
print('AC x ' + str(a))
print('WA x ' + str(w))
print('TLE x ' + str(t))
print('RE x ' + str(r))

Submission status: Accepted

Solution code:
N = int(input())
word_list = ["AC","WA","TLE","RE"]
count_list = [0,0,0,0]
for i in range(N):
    word_ = input()
    count_list[word_list.index(word_)] += 1

for i in range(4):
    print(word_list[i]," x ",count_list[i])

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, gcd
from itertools import accumulate, permutations, combinations, product, groupby, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = [input() for _ in range(N)]
AC = 0
WA = 0
TLE = 0
RE = 0

for s in S:
    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:
from collections import defaultdict


def main():
    N = int(input())
    cnt = defaultdict(int)
    for _ in range(N):
        S = input()
        cnt[S] += 1
    for key in ['AC', 'WA', 'TLE', 'RE']:
        print(key, 'x', cnt[key])


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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
input = sys.stdin.readline
N = int(input())
S = [input().rstrip() for _ in range(N)]
c = [0]*4
for s in S:
    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 {0}'.format(c[0]))
print('WA x {0}'.format(c[1]))
print('TLE x {0}'.format(c[2]))
print('RE x {0}'.format(c[3]))

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.readline
sys.setrecursionlimit(10**8)
mod = 10**9+7
#mod = 998244353
INF = 10**18
eps = 10**-7

N = int(readline())
S = [readline().rstrip() for i in range(N)]

from collections import Counter

Sc = Counter(S)
print("AC x", Sc["AC"])
print("WA x", Sc["WA"])
print("TLE x", Sc["TLE"])
print("RE x", Sc["RE"])

Submission status: Accepted

Solution code:
n = int(input())
dic = {"AC":0, "WA":0, "TLE":0, "RE":0}
for _ in range(n):
    dic[input()] += 1
    
for key, value in dic.items():
    print(key, "x", value)

Submission status: Accepted

Solution code:
n = int(input())
ac = 0
tle = 0
wa = 0
re = 0
for i in range(n):
    s = input()
    if s == 'WA':
        wa += 1
    elif s == 'RE':
        re += 1
    elif s == "TLE":
        tle += 1
    else:
        ac += 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)]
a=0
b=0
c=0
d=0
for i in s:
    if i=='AC':
        a+=1
    elif i=='WA':
        b+=1
    elif i=='TLE':
        c+=1
    elif i=='RE':
        d+=1

print('AC x %d'% a)
print('WA x %d'% b)
print('TLE x %d'% c)
print('RE x %d'% d)

Submission status: Accepted

Solution code:
import sys
from collections import Counter

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    S = [readline().strip() for _ in range(N)]
    
    c = Counter(S)
    
    print(f'AC x ' + str(c['AC']))
    print(f'WA x ' + str(c['WA']))
    print(f'TLE x ' + str(c['TLE']))
    print(f'RE x ' + str(c['RE']))
    
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import collections

C = collections.Counter(input() for _ in range(int(input())))
for s in ['AC', 'WA', 'TLE', 'RE']:
    print('{} x {}'.format(s, C[s]))

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

D={"AC":0,"WA":0,"TLE":0,"RE":0}
for _ in range(N):
    S=input()
    D[S]+=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 sys
# input = sys.stdin.readline

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

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

Submission status: Accepted

Solution code:
import collections
n = int(input())
s = [input() for _ in range(n)]
c = collections.Counter(s)
for i in ["AC", "WA", "TLE", "RE"]:
	print(f"{i} x {c[i]}")

Submission status: Accepted

Solution code:
import math,itertools,fractions,heapq,collections,bisect,sys,queue,copy

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
# def LF(): return [float(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a=b=c=d=0
  n=I()
  for _ in range(n):
    s=S()
    if s=='AC':
      a+=1
    elif s=='WA':
      b+=1
    elif s=='TLE':
      c+=1
    else:
      d+=1

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

main()
# print(main())

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left, insort, insort_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7 
#mod = 998244353
from decimal import *
#import numpy as np
#decimal.getcontext().prec = 10


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

print("AC x {}".format(S.count("AC")))
print("WA x {}".format(S.count("WA")))
print("TLE x {}".format(S.count("TLE")))
print("RE x {}".format(S.count("RE")))

Submission status: Accepted

Solution code:
n = int(input())
s = list(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:
import sys

input = sys.stdin.readline


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

    count = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
    for _ in range(N):
        S = input().rstrip()
        count[S] += 1

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import Counter

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

C=Counter(S)

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict

sys.setrecursionlimit(500005)
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().strip()

n = ni()
dic = defaultdict(int)
for i in range(n):
    dic[ns()] += 1
for w in ("AC", "WA", "TLE", "RE"):
    print(f"{w} x {dic[w]}")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**8)
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return [LIST() for _ in range(n)]


from collections import Counter


INF = float("inf")
MOD = 10**9 + 7


def main():
    N = INT()
    S = [input() for i 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"]))
    return


if __name__ == '__main__':
    main()