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

ans1 = 0
ans2 = 0
ans3 = 0
ans4 = 0
for i in range(N):
    S = input()
    if S=="AC":
        ans1 += 1
    elif S =="WA":
        ans2 += 1
    elif S == "TLE":
        ans3 += 1
    elif S == "RE":
        ans4 += 1
print("AC x " + str(ans1))
print("WA x " + str(ans2))
print("TLE x " + str(ans3))
print("RE x " + str(ans4))

Submission status: Accepted

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

for i in range(n) :
    s = input().rstrip('\n')
    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())
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 == 'RE':
        re += 1
    else:
        tle += 1
print("AC x " + str(ac)) 
print("WA x " + str(wa))
print("TLE x " + str(tle)) 
print("RE x " + str(re))

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,*a=open(0).read().split()
d={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in a:
  d[i]=d.get(i,0)+1
for i,j in d.items():
     print(i,"x",j)

Submission status: Accepted

Solution code:
n = int(input())

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

print('AC x', str(s_list.count('AC')))
print('WA x', str(s_list.count('WA')))
print('TLE x', str(s_list.count('TLE')))
print('RE x', str(s_list.count('RE')))

Submission status: Accepted

Solution code:
n=int(input())

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

for i 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())
S = list()
cnt_AC = 0
cnt_WA = 0
cnt_TLE = 0
cnt_RE = 0
for i in range(N):
  S.append(input())
for i in range(N):
  result = S[i]
  if result == "AC":
    cnt_AC += 1
  elif result == 'WA':
    cnt_WA += 1
  elif result == 'TLE':
    cnt_TLE += 1
  elif result == 'RE':
    cnt_RE += 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:
n = int(input())
s = [input() for i in range(n)]
a = s.count("AC")
b = s.count("WA")
c = s.count("TLE")
d = s.count("RE")
print("AC x "+str(a))
print("WA x "+str(b))
print("TLE x "+str(c))
print("RE x "+str(d))

Submission status: Accepted

Solution code:
n=int(input())
count1=0
count2=0
count3=0
count4=0
for i in range(n):
    s=input()
    if s=='AC':
        count1+=1
    elif s=='WA':
        count2+=1
    elif s=='TLE':
        count3+=1
    else:
        count4+=1
print('AC x '+str(count1))
print('WA x '+str(count2))
print('TLE x '+str(count3))
print('RE x '+str(count4))

Submission status: Accepted

Solution code:
n = int(input())

dic = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(n):
    a = input()
    dic[a] += 1
    
for i in dic:
    print(i+' x '+str(dic[i]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def main():
    n = I()
    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
        else:
            re += 1
    print("AC x {}".format(ac))
    print("WA x {}".format(wa))
    print("TLE x {}".format(tle))
    print("RE x {}".format(re))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    n = int(input())
    from collections import Counter as cc
    S = []
    for i in range(n):
        S.append(input())
    S = cc(S)
    print('AC x {}'.format(S['AC']))
    print('WA x {}'.format(S['WA']))
    print('TLE x {}'.format(S['TLE']))
    print('RE x {}'.format(S['RE']))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
S = [input() 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
    elif s == "RE":
        C[3] += 1

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

Submission status: Accepted

Solution code:
import copy

# a = get_int()
def get_int():
    return int(input())

# a = get_string()
def get_string():
    return input()

# a_list = get_int_list()
def get_int_list():
    return [int(x) for x in input().split()]

# a_list = get_string_list():
def get_string_list():
    return input().split()

# a, b = get_int_multi()
def get_int_multi():  # a, b = get_int_multi()
    return map(int, input().split())

# a_list = get_string_char_list()
def get_string_char_list():
    return list(str(input()))

# print("{} {}".format(a, b))
# for num in range(0, a):
# a_list[idx]
# a_list = [0] * a
'''
while (idx < n) and ():

    idx += 1
'''

def main():

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


    n = get_int()
    for num in range(n):
        work = get_string()
        if work == "AC":
            ac += 1
        elif work == "WA":
            wa += 1
        elif work == "TLE":
            tle += 1
        elif work == "RE":
            re += 1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
from math import floor, sqrt, factorial, hypot, log  # log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict, deque
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint


def ceil(a, b): return (a + b - 1) // b


inf = float('inf')
mod = 10 ** 9 + 7


def pprint(*A):
    for a in A:     print(*a, sep='\n')


def INT_(n): return int(n) - 1


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


def MF(): return map(float, input().split())


def MI_(): return map(INT_, input().split())


def LI(): return list(MI())


def LI_(): return [int(x) - 1 for x in input().split()]


def LF(): return list(MF())


def LIN(n: int): return [I() for _ in range(n)]


def LLIN(n: int): return [LI() for _ in range(n)]


def LLIN_(n: int): return [LI_() for _ in range(n)]


def LLI(): return [list(map(int, l.split())) for l in input()]


def I(): return int(input())


def F(): return float(input())


def ST(): return input().replace('\n', '')

from collections import Counter


def main():
    N = I()
    a = []
    for i in range(N):
        j = ST()
        a.append(j)
    cnt = Counter(a)
    print('AC x ' + str(cnt['AC']))
    print('WA x ' + str(cnt['WA']))
    print('TLE x ' + str(cnt['TLE']))
    print('RE x ' + str(cnt['RE']))
    

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
result_list = ["AC","WA","TLE","RE"]
dic = dict([[result,0] for result in result_list])
n = int(input())
for _ in range(n):
    dic[input()]+=1
for result in result_list:
    print(result + " x " + str(dic[result]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

C0,C1,C2,C3=0,0,0,0

for i in range(N):
    S = input()
    if S=="AC":
        C0 +=1
    elif S=="WA":
        C1 +=1
    elif S=="TLE":
        C2 +=1
    else:
        C3+=1

print("AC x "+ str(C0))
print("WA x "+ str(C1))
print("TLE x "+ str(C2))
print("RE x "+ str(C3))

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
    else:
        pass

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:
ac=0
wa=0
tle=0
re=0
n=int(input())
for _ in range(n):
  x=input()
  if x=='AC':
    ac+=1
  elif x=='WA':
    wa+=1
  elif x=='TLE':
    tle+=1
  elif x=='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 = ['' for i in range(N)]
for i in range(N):
    S[i] = input()
    
print('AC x',S.count('AC'))
print('WA x',S.count('WA'))
print('TLE x',S.count('TLE'))
print('RE x',S.count('RE'))

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' + ' ' + 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())
c0,c1,c2,c3=0,0,0,0
for _ in range(n):
    s=input()
    if s=="AC":
        c0+=1
    elif s=="TLE":
        c2+=1
    elif s=="WA":
        c1+=1
    else:
        c3+=1
print("AC x",c0)
print("WA x",c1)
print("TLE x",c2)
print("RE x",c3)

Submission status: Accepted

Solution code:
n=int(input())
li=[0]*4

for i in range(n):
    s=input()
    if s == "AC":
        li[0]+=1
    if s == "WA":
        li[1]+=1
    if s == "TLE":
        li[2]+=1
    if s == "RE":
        li[3]+=1

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

Submission status: Accepted

Solution code:
N = int(input())
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0 


for i in range(N):
    tmp = str(input())
    if tmp == "AC":
        count_AC += 1
    elif tmp == "WA":
        count_WA += 1
    elif tmp == "TLE":
        count_TLE += 1
    else:
        count_RE += 1

print("AC x " + str(count_AC))
print("WA x " + str(count_WA))
print("TLE x " + str(count_TLE))
print("RE x " + str(count_RE))

Submission status: Accepted

Solution code:
N=int(input())

C=[0]*4

for i in range(N):
  S=input()
  if(S=="AC"):
    C[0]+=1
  if(S=="WA"):
    C[1]+=1
  if(S=="TLE"):
    C[2]+=1
  if(S=="RE"):
    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:
def main():
    N = int(input())
    S = [input() for _ in range(N)]
    c_AC = len([x for x in S if x == "AC"])
    c_WA = len([x for x in S if x == "WA"])
    c_TLE = len([x for x in S if x == "TLE"])
    c_RE = len([x for x in S if x == "RE"])
    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())

ans = [0]*4
for n in range(N):
  C = input()
  if C == "AC":
    ans[0] += 1
  elif C == "WA":
    ans[1] += 1
  elif C == "TLE":
    ans[2] += 1
  elif C == "RE":
    ans[3] += 1

print("AC x {}".format(ans[0]))
print("WA x {}".format(ans[1]))
print("TLE x {}".format(ans[2]))
print("RE x {}".format(ans[3]))

Submission status: Accepted

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

ans = [0] * 4

for i in s:
  if i == "AC":
    ans[0] += 1
  elif i == "WA":
    ans[1] += 1
  elif i == "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 collections

N = int(input())
judge = collections.Counter([input() for _ in range(N)])
print("AC x " + str(judge["AC"]))
print("WA x " + str(judge["WA"]))
print("TLE x " + str(judge["TLE"]))
print("RE x " + str(judge["RE"]))

Submission status: Accepted

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

for i in s:
    d[i] += 1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
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())
numl = [0] * 4
for i in range(n):
    s = input()
    if(s == "AC"):
        numl[0]+=1
    elif(s ==  "WA"):
        numl[1]+=1
    elif(s == "TLE"):
        numl[2]+=1
    else:
        numl[3]+=1
print("AC x "+str(numl[0]))
print("WA x "+str(numl[1]))
print("TLE x "+str(numl[2]))
print("RE x "+str(numl[3]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

C0=0
C1=0
C2=0
C3=0

for n in range(N):
    S=input()
    if S=="AC":
        C0+=1
    elif S=="WA":
        C1+=1
    elif S=="TLE":
        C2+=1
    else:
        C3+=1   

print("AC x "+str(C0))
print("WA x "+str(C1))
print("TLE x "+str(C2))
print("RE x "+str(C3))

Submission status: Accepted

Solution code:
n = input()
num = int(n)
ans = [0,0,0,0]
for i in range(num):
    a = input()
    if a =="AC":
        ans[0]+=1
    elif a == "WA":
        ans[1]+=1
    elif a == "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:
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:
# -*- coding: utf-8 -*-
"""
@author: H_Hoshigi
"""
def main():
    N = int(input())
    S_lsit = [input() for i in range(N)]

    counter_list = [0, 0, 0, 0]
    for S in S_lsit:
        if S == "AC":
            counter_list[0] += 1
        elif S == "WA":
            counter_list[1] += 1
        elif S == "TLE":
            counter_list[2] += 1
        elif S == "RE":
            counter_list[3] += 1
    print("AC x {}".format(counter_list[0]))
    print("WA x {}".format(counter_list[1]))
    print("TLE x {}".format(counter_list[2]))
    print("RE x {}".format(counter_list[3]))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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 ' + str(ans['AC']))
    print('WA x ' + str(ans['WA']))
    print('TLE x ' + str(ans['TLE']))
    print('RE x ' + str(ans['RE']))
if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(n):
  tmp = input()
  if tmp == "AC":
    s[0] += 1
  elif tmp == "WA":
    s[1] += 1
  elif tmp == "TLE":
    s[2] += 1
  elif tmp == "RE":
    s[3] += 1

print("AC x {}".format(s[0]))
print("WA x {}".format(s[1]))
print("TLE x {}".format(s[2]))
print("RE x {}".format(s[3]))

Submission status: Accepted

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

ans = [0]*4
for i in range(n):
    if s[i] == 'AC':
        ans[0] += 1
    elif s[i] == 'WA':
        ans[1] += 1
    elif s[i] == 'TLE':
        ans[2] += 1
    elif s[i] == 'RE':
        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:

def main():
    N = int(input())
    cases = dict()
    for _ in range(N):
        s = input()
        cases[s] = cases.get(s, 0) + 1
    
    results = ["AC", "WA", "TLE", "RE"]

    for r in results:
        print(f"{r} x {cases.get(r, 0)}")
    

if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = [0]*4

for i in range(n):
    if s[i] == 'AC':
        ans[0] += 1
    elif s[i] == 'WA':
        ans[1] += 1
    elif s[i] == '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 collections
n=int(input())
data=[]
for i in range(n):
    num=input()
    data.append(num)
data=collections.Counter(data)
print("AC x {}".format(data["AC"]))
print("WA x {}".format(data["WA"]))
print("TLE x {}".format(data["TLE"]))
print("RE x {}".format(data["RE"]))

Submission status: Accepted

Solution code:
from sys import stdin

def main():

    input = stdin.readline

    N = int(input())

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


    for _ in range(N):
        s = str(input())[:-1]
        if s == "AC":
            AC += 1
        elif s == "WA":
            WA += 1
        elif s == "TLE":
            TLE += 1
        elif s == "RE":
            RE += 1



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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

print('AC x ' + str(r['AC']) )
print('WA x ' + str(r['WA']) )
print('TLE x ' + str(r['TLE']) )
print('RE x ' + str(r['RE']) )

Submission status: Accepted

Solution code:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# import numpy as np
sys.setrecursionlimit(int(pow(10,6)))
# sys.stdin = open("input.txt", "r")
# sys.stdout = open("out.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def L(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]

# @lru_cache(None)

t=1
# t=int(input())
for _ in range(t):
    n=L()[0]
    a,b,c,d=0,0,0,0
    for i in range(n):
        x=input()
        if x=="AC":
            a+=1
        elif x=="WA":
            b+=1
        elif x=="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 = {'AC':0, 'TLE':0, 'WA':0, 'RE':0}
for i 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:
import sys
from collections import defaultdict
from typing import Callable


def main():
    readline: Callable[[], str] = sys.stdin.readline

    memory: defaultdict = defaultdict(int)

    n: int = int(readline().rstrip())
    for _ in range(n):
        s: str = readline().rstrip()
        memory[s] += 1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter
t=int(input())
lst=[]
for _ in range(t):
	lst.append(input())
lst=Counter(lst)
if 'AC' in lst.keys():
	print("AC x",lst['AC'])
else:
	print("AC x 0")
if 'WA' in lst.keys():
	print("WA x",lst['WA'])
else:
	print("WA x 0")
if 'TLE' in lst.keys():
	print("TLE x",lst['TLE'])
else:
	print("TLE x 0")
if 'RE' in lst.keys():
	print("RE x",lst['RE'])
else:
	print("RE x 0")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
C0 = C1 = C2 = C3 = 0
for i in range(N):
    test = input()
    if test == 'AC':
        C0 += 1
    elif test == 'WA':
        C1 += 1
    elif test == 'TLE':
        C2 += 1
    else:
        C3 += 1
print('AC x ' + str(C0))
print('WA x ' + str(C1))
print('TLE x ' + str(C2))
print('RE x ' + str(C3))

Submission status: Accepted

Solution code:
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
cnt = [0]*4
for i in range(N):
    S = readline().decode().rstrip()
    if S == 'AC':
        cnt[0] +=1
    if S == 'WA':
        cnt[1] +=1
    if S == 'TLE':
        cnt[2] +=1
    if 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:
from collections import defaultdict

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

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
  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:
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(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())
d={'AC':0,'WA':0,'TLE':0,'RE':0}
for _ in range(N):
    Si = input()
    d[Si] +=1
for k in d:
    print('{} x {}'.format(k,d[k]))

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

a={}
a['AC']=0
a['WA']=0
a['TLE']=0
a['RE']=0
for n in range(N):
    s=input()
    a[s]+=1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
keys=['AC','WA','TLE','RE']
result = { 'AC':0,'TLE':0,'WA':0,'RE':0 }

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

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

Submission status: Accepted

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

for i in range(n):
    x = input()
    if x == 'AC':
        ac += 1
    elif x == 'WA':
        wa += 1
    elif x == 'TLE':
        tle += 1
    elif x == '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
read = sys.stdin.read
readline = sys.stdin.buffer.readline
from collections import defaultdict
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N = int(readline())
    d = defaultdict(int)
    for _ in range(N):
        c = readline().decode('utf-8').strip()
        d[c]+=1
    d['AC'] += 0
    d['WA'] += 0
    d['TLE'] += 0
    d['RE'] += 0

    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:
from collections import defaultdict

N = int(input())
d = defaultdict(int)
for i in range(N):
    k = input()
    d[k] += 1
for k in ["AC", "WA", "TLE", "RE"]:
    print(f"{k} x {d[k]}")

Submission status: Accepted

Solution code:
n = int(input())
result = [0]*4
for i in range(n):
    r = input()
    if r == 'AC':
        result[0] += 1
    elif r == 'WA':
        result[1] += 1
    elif r == 'TLE':
        result[2] += 1
    elif r == 'RE':
        result[3] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
l = []
for _ in range(n):
    l.append(input()) # l += [input()]でもOK
#rint(l)

ac,wa,tle,re = 0,0,0,0
for i in l:
    if i == 'AC':
        ac += 1
    elif i == 'WA':
        wa += 1
    elif i =='TLE':
        tle += 1
    elif i == '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())
ac=0
wa=0
tle=0
re=0

for i in range(n):
    tmp=input()
    if tmp == 'AC':
        ac += 1
    if tmp == 'WA':
        wa += 1
    if tmp == 'TLE':
        tle += 1
    if tmp == '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())
l = [0, 0, 0, 0]


for i in range(n):
  s = input()
  if s == 'AC':
    l[0] += 1
  elif s == 'WA':
    l[1] += 1
  elif s == 'TLE':
    l[2] += 1
  else:
    l[3] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
lis  = [0] * 4
for i in range(n):
    a = input()
    if a == "AC":
        lis[0] += 1
    elif a == "WA":
        lis[1] += 1
    elif a == "TLE":
        lis[2] += 1
    elif a == "RE":
        lis[3] += 1

tmp = ["AC x", "WA x", "TLE x", "RE x"]

for i in range(4):
    print(tmp[i], lis[i])

Submission status: Accepted

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


ac = 0
wa = 0
tle = 0
re = 0
for i in s:
    if i == 'AC':
        ac+=1
    elif i == 'WA':
        wa+=1
    elif i == '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())
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:
from collections import Counter
n = int(input())

S = [input() for i in range(n)]
S = Counter(S)

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

for i in li:
    if S.get(i):
        print(i+' x '+str(S[i]))
    else:
        print(i+' x '+str(0))