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())
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())
a=0
b=0
c=0
d=0
for i in range(n):
    x=input()
    if x =="AC":
        a = a+1
    if x =="WA":
        b = b+1
    if x =="TLE":
        c = c+1
    if x =="RE":
        d = 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:
def l_in(type_): return list(map(type_, input().split()))
def i_in(): return int(input())
def m_in(type_): return map(type_, input().split())
def r_in(n, type_): return [type_(input()) for _ in range(n)]
ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

n = i_in()
s = r_in(n, str)
for k in s:
    ans[k] += 1

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

Submission status: Accepted

Solution code:
n=int(input())
counta=0
countw=0
countt=0
countr=0
for i in range(n):
    s=input()
    if s=='AC':
        counta+=1
    elif s=='WA':
        countw+=1
    elif s=='TLE':
        countt+=1
    else:
        countr+=1
print('AC x '+str(counta))
print('WA x '+str(countw))
print('TLE x '+str(countt))
print('RE x '+str(countr))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
s = [input() for _ in range(N)]
c0, c1, c2, c3 = s.count('AC'), s.count('WA'), s.count('TLE'), s.count('RE')
print('AC x', c0)
print('WA x', c1)
print('TLE x', c2)
print('RE x', c3)

Submission status: Accepted

Solution code:
N =int(input())

count = [0,0,0,0]

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
  elif S == 'RE':
    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())
s = [input() for i in range(n)]

from collections import Counter
cnt = Counter(s)

if 'AC' in cnt:
    print('AC x ' + str(cnt['AC']))
else:
    print('AC x 0')
if 'WA' in cnt:
    print('WA x ' + str(cnt['WA']))
else:
    print('WA x 0')
if 'TLE' in cnt:
    print('TLE x ' + str(cnt['TLE']))
else:
    print('TLE x 0')
if 'RE' in cnt:
    print('RE x ' + str(cnt['RE']))
else:
    print('RE x 0')

Submission status: Accepted

Solution code:
status = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE':0}
N = int(input())
for _ in range(N):
  status[input()] += 1
for k, v in status.items():
  print("{} x {}".format(k, v))

Submission status: Accepted

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

l = [0]*4
for i in range(N):
  S = input()
  if S == "AC":
    l[0] += 1
  elif S == "WA":
    l[1] += 1
  elif S == "TLE":
    l[2] += 1
  elif S == "RE":
    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:
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools


#sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]

N = int(input())
S = [0]*4

for i in range(N):
  s = str(input())
  if(s=="AC"):
    S[0]+= 1
  elif(s=="WA"):
    S[1]+= 1
  elif(s=="TLE"):
    S[2]+= 1
  else:
    S[3] += 1

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

#print(S)

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:
N=int(input())
S=[input() for i in range(N)]
a,b,c,d=0,0,0,0
for i in S:
    if i=="AC":
        a+=1
    if i=="WA":
        b+=1
    if i=="TLE":
        c+=1
    if i=="RE":
        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:
# -*- coding: utf-8 -*-

N = int(input())

str_list = [input() for _ in range(N)]
count_dict={'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(N):
    count_dict[str_list[i]] += 1

for k, v in count_dict.items():
    print(k,' x ', v)

Submission status: Accepted

Solution code:
n = int(input())
ac = wa = tle = re = 0
for _ in range(n):
    tmp = input()
    if tmp == 'AC':
        ac += 1
    elif tmp == 'WA':
        wa += 1
    elif tmp == 'TLE':
        tle += 1
    else:
        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:
from collections import Counter
n=int(input())
a=[input()for i in range(n)]
a.extend(["AC","TLE","WA","RE"])
c=Counter(a)

d=c["AC"]-1
e=c["WA"]-1
f=c["TLE"]-1
g=c["RE"]-1

print("{} {} {}".format("AC","x",d))
print("{} {} {}".format("WA","x",e))
print("{} {} {}".format("TLE","x",f))
print("{} {} {}".format("RE","x",g))

Submission status: Accepted

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

for i in range(n):
    a = input()
    if a == "AC":
        AC += 1
    if a == "WA":
        WA += 1
    if a == "TLE":
        TLE += 1
    if a == "RE":
        RE += 1

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

Submission status: Accepted

Solution code:

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

    #AC WA TLE RE
    l = [0 for i in range(4)]

    for i in range(N):
        Inp = input()
        if Inp == "AC":
            l[0] += 1
        if Inp == "WA":
            l[1] += 1
        if Inp == "TLE":
            l[2] += 1
        if Inp== "RE":
            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]))



abc173_b()

Submission status: Accepted

Solution code:
import collections

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

ans = ("AC", "WA", "TLE", "RE")
cnt = collections.Counter(S)

for a in ans:
    print(f"{a} x {cnt[a]}")

Submission status: Accepted

Solution code:
N = int(input())
C = [list(map(str,input().split())) for _ in range(N)]

l = [0]*4

for c in C:
  if c == ["AC"]:
    l[0] += 1
  elif c == ["WA"]:
    l[1] += 1
  elif c == ["TLE"]:
    l[2] += 1
  else:
    l[3] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
l = {
  'AC': 0,
  'WA': 0,
  'TLE': 0,
  'RE': 0
}

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

print('AC x %d' % (l['AC']))
print('WA x %d' % (l['WA']))
print('TLE x %d' % (l['TLE']))
print('RE x %d' % (l['RE']))

Submission status: Accepted

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

for i in range(N):
    S.append(input())
    
print('AC x {}'.format(S.count('AC')))
print('WA x {}'.format(S.count('WA')))
print('TLE x {}'.format(S.count('TLE')))
print('RE x {}'.format(S.count('RE')))

Submission status: Accepted

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

import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        for line in sys.stdin:
            lines.append(line.strip())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    n = int(lines[0])
    ss = lines[1:]

    return (n, ss)


def solve(n, ss):


    d = dict()
    for i in range(n):
        s = ss[i]
        cnt = d.get(s, 0)
        cnt = cnt + 1
        d[s] = cnt

    result = []
    for e in ['AC', 'WA', 'TLE', 'RE']:
        result.append("%s x %d " % (e, d.get(e, 0)))
    
    return result    


def main():
    # 出力
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Submission status: Accepted

Solution code:
import collections

def main():
    n = int(input())
    s = []
    for i in range(n):
        s_ = input()
        s.append(s_)
    
    c = collections.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"]))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

idx = 0

while idx < N:
    idx += 1
    AAA = input()
    if AAA == "AC":
        ac += 1
    elif AAA == "WA":
        wa += 1
    elif AAA == "TLE":
        tle += 1
    elif AAA == "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())
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(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())
cnt = [0] * 4
for n 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 ',cnt[0])
print('WA x ',cnt[1])
print('TLE x ',cnt[2])
print('RE x ',cnt[3])

Submission status: Accepted

Solution code:
testCase = {'AC':0, 'WA':0, 'TLE': 0, 'RE':0 }

N = int(input())
for i in range(N):
    testCase[input()] += 1

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

Submission status: Accepted

Solution code:
N = int(input())
l =[]
a=0
b=0
c=0
d=0
for i in range(N):
  l.append(input())
for i in range(N):
  if l[i]=="AC":
    a = a+1
  elif l[i]=="WA":
    b = b+1
  elif l[i]=="TLE":
    c = c+1
  else:
    d = d+1
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)

Submission status: Accepted

Solution code:
judge = ['AC', 'WA', 'TLE', 'RE']
cnt = [0] * 4
N = int(input())
for _ in range(N):
    s = input()
    for i in range(len(judge)):
        if s == judge[i]:
            cnt[i] += 1
for i in range(4):
    print(judge[i] + ' ' + 'x' + ' ' + str(cnt[i]))

Submission status: Accepted

Solution code:
N = int(input())
ans = []
for i in range(4):
    ans.append(0)
for n in range(N):
    S = input()
    if(S == 'AC'):
        ans[0] += 1
    elif(S == 'WA'):
        ans[1] += 1
    elif(S == 'TLE'):
        ans[2] += 1
    elif(S == '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:
n = int(input())
s = []
judges = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
    s = input().strip()
    judges[s] += 1

for judge,count in judges.items():
    print(f"{judge} x {count}")

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline
readlines = sys.stdin.readlines
ns = lambda: readline().rstrip() # input string
ni = lambda: int(readline().rstrip()) # input int
nm = lambda: map(int, readline().split()) # input multiple int 
nl = lambda: list(map(int, readline().split())) # input multiple int to list

n = ni()
cnt = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(n):
    s = ns()
    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:
n = int(input())
l = [0, 0, 0, 0]
for _ in range(n) :
    s = input()
    if s == "AC" :
        l[0] += 1
    if s == "WA" :
        l[1] += 1
    if s == "TLE" :
        l[2] += 1
    if s == "RE" :
        l[3] += 1
print("AC x " + str(l[0]) + "\nWA x " + str(l[1]) + "\nTLE x " + str(l[2]) + "\nRE x " + str(l[3]))

Submission status: Accepted

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

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 {}".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_cnt = 0
WA_cnt = 0
TLE_cnt = 0
RE_cnt = 0


L = []

for n in range(0,N):
    n = input()
    L.append(n)
    if n == "AC":
        AC_cnt += 1
    elif n == "WA":
        WA_cnt += 1
    elif n == "TLE":
        TLE_cnt += 1
    elif n == "RE":
        RE_cnt += 1

print("AC x",AC_cnt)
print("WA x",WA_cnt)
print("TLE x",TLE_cnt)
print("RE x",RE_cnt)

Submission status: Accepted

Solution code:
import collections


def actual(N, S):
    c = collections.Counter(S)

    s = ''
    s += f'AC x {c["AC"]}\n'
    s += f'WA x {c["WA"]}\n'
    s += f'TLE x {c["TLE"]}\n'
    s += f'RE x {c["RE"]}'

    return s

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

print(actual(N, S))

Submission status: Accepted

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

for x 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 = int(input())

results = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(n):
    result = input()
    results[result] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
l = [0]*4
for i in range(n):
  s = input()
  if s=="AC":
    l[0]=l[0]+1
  elif s=="WA":
    l[1]=l[1]+1
  elif s=="TLE":
    l[2]=l[2]+1
  else:
    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,*a = map(str,open(0).read().split())

n = int(n)
A = a.count("AC")
B = a.count("WA")
C = a.count("TLE")
D = a.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:
import collections
n=int(input())
l=[]
for i in range(n):
  l.append(input())
c=collections.Counter(l)
for k in ['AC','WA','TLE','RE']:
  if k in c.keys():
    print(k+' x '+str(c[k]))
  else: print(k+' x '+str(0))

Submission status: Accepted

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

AC = s.count("AC")
TLE = s.count("TLE")
WA = s.count("WA")
RE = s.count("RE")


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())
judge = [0,0,0,0]
for _ in range(n):
    a = input()
    if a == 'AC':
        judge[0] += 1
    elif a == 'WA':
        judge[1] += 1
    elif a == 'TLE':
        judge[2] += 1
    else:
        judge[3] += 1
print('AC x '+str(judge[0])+'\nWA x '+str(judge[1])+'\nTLE x '+str(judge[2])+'\nRE x '+str(judge[3]))

Submission status: Accepted

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

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

for si in s:
    if si in answers.keys():
        answers[si] += 1

for ans,c in answers.items():
    print(ans + ' x ' + str(c))

Submission status: Accepted

Solution code:
N = int(input())
score_dic = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(N):
    sc = input()
    score_dic[sc] += 1
print('AC x ' + str(score_dic['AC']))
print('WA x ' + str(score_dic['WA']))
print('TLE x ' + str(score_dic['TLE']))
print('RE x ' + str(score_dic['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 = str(input())
        if A == 'AC':
            AC += 1
        elif A == 'WA':
            WA += 1
        elif A == 'TLE':
            TLE += 1
        elif A == 'RE':
            RE += 1
    print('AC x ' + str(AC))
    print('WA x ' + str(WA))
    print('TLE x ' + str(TLE))
    print('RE x ' + str(RE))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

c_dict = {}
for _ in range(N):
    s = input()
    if s in c_dict.keys():
        c_dict[s]+=1
    else:
        c_dict[s]=1

keys = ["AC", "WA", "TLE", "RE"]
for key in keys:
    if not key in c_dict.keys():
        print("%s x 0"%(key))
    else:
        print("%s x %d"%(key, c_dict[key]))

Submission status: Accepted

Solution code:
ans = [0]*4
for i in range(int(input())):
    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 {}\nWA x {}\nTLE x {}\nRE x {}".format(*ans))

Submission status: Accepted

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



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
a=int(input())
list1=[0]*4
list2=['AC','WA','TLE','RE']
for i in range(a) :
  b=input()
  if b=='AC' :
    list1[0]+=1
  elif b=='WA' :
    list1[1]+=1
  elif b=='TLE' :
    list1[2]+=1
  else :
    list1[3]+=1

for i in range(4) :
  print(list2[i]+' x '+str(list1[i]))

Submission status: Accepted

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

for i in range(N):
    txt = input()
    if txt == "AC":
        AC += 1
    elif txt == "WA":
        WA += 1
    elif txt == "TLE":
        TLE += 1
    else:
        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())
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
    
for i,j in enumerate(count):
  if i==0:
    print('AC x',j)
  elif i==1:
    print('WA x',j)
  elif i==2:
    print('TLE x',j)
  else:
    print('RE x',j)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
S = list()
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  s = input()
  if s == "AC":
    AC += 1
  elif s == "WA":
    WA += 1
  elif s == "TLE":
    TLE += 1
  elif s == "RE":
    RE += 1

print("AC x " + str(AC))
print("WA x " + str(WA))
print("TLE x " + str(TLE))
print("RE x " + str(RE))

Submission status: Accepted

Solution code:
n = int(input())
ans=[0]*4
for _ in range(n):
    s=str(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 Counter

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

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:
from collections import Counter
N = int(input())
S = []
for i in range(N):
    S.append(input())
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:
# Problem B - Judge Status Summary

# input
N = int(input())

# initialization
ac = 0
wa = 0
tle = 0
re = 0

# count
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

# output
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:

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

Submission status: Accepted

Solution code:
N = int(input())

l = []
for i in range(N):
    l.append(input())

for ind in ["AC", "WA", "TLE", "RE"]:
    n = l.count(ind)
    print(ind + " x " + str(n))

Submission status: Accepted

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

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

for i in range(N):
    if S[i] == "AC":
        AC += 1
    elif S[i] == "WA":
        WA += 1
    elif S[i] == "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 = int(input())
s = []
for i in range(N):
  S=input()
  s.append(S)
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())
C0 = 0
C1 = 0
C2 = 0
C3 = 0

for i in range(N):
    a = input()
    if a == 'AC':
        C0 += 1
    if a == 'WA':
        C1 += 1
    if a == 'TLE':
        C2 += 1
    if a == 'RE':
        C3 += 1
print(f'AC x {C0}')
print(f'WA x {C1}')
print(f'TLE x {C2}')
print(f'RE x {C3}')

Submission status: Accepted

Solution code:
# 初期入力
import sys
input = sys.stdin.readline
N = int(input())
ac =0
tle =0
wa =0
re =0
for i in range(N):
    S =input().strip()
    if S=="AC":
        ac +=1
    elif S=="TLE":
        tle +=1
    elif S=="WA":
        wa +=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):
  judge = input()
  if judge == 'AC':
    AC += 1
  elif judge == 'WA':
    WA += 1
  elif judge == 'TLE':
    TLE += 1
  elif judge == '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:
import collections

N=int(input())
list=[]

for i in range(0,N) :
  a = input()
  list.append(a)

c = collections.Counter(list)

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    N = int(input())
    S = [input() for i 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')))


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):
	a=input()
	if a=='AC':
		A+=1
	if a=='WA':
		W+=1
	if a=='TLE':
		T+=1
	if a=='RE':
		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:
import collections

n=int(input()) 
s = []
c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i in range(n):
    tmp=input()
    s.append(tmp)

c = collections.Counter(s)

c0 = c['AC']
c1 = c['WA']
c2 = c['TLE']
c3 = c['RE']


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())
s = [list(input()) for _ in range(n)]
ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
    if s[i][0] == 'A':
        ac += 1
    elif s[i][0] == 'W':
        wa += 1
    elif s[i][0] == 'T':
        tle += 1
    elif s[i][0] == 'R':
        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())

d = {"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  c = input()
  d[c]=d[c]+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"]), end='')

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


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

for i in range(4):
    txt="{0} x {1}".format(results[i], count[i])
    print(txt)

Submission status: Accepted

Solution code:
N = int(input())
S = [0]*4
for i in range(N):
    C = str(input())
    if C == 'AC':
        S[0] += 1
    elif C == 'WA':
        S[1] += 1
    elif C == 'TLE':
        S[2] += 1
    elif C == 'RE':
        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())
S = []
for i in range(N):
  S.append(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())
ans = {
    'AC': 0,
    'WA': 0,
   	'TLE': 0,
   	'RE': 0
}

for i in range(n):
  x = input()
  ans[x] += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

for k,v in s.items():
	print("{} x {}".format(k,v))

Submission status: Accepted

Solution code:
N=int(input())
a,w,t,r=0,0,0,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 '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print('RE x '+str(r))

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
S = []
for i in range(N):
    s_in = input()
    # if s_in == '' or s_in is None: break
    S.append(s_in)

counter = Counter(S)
for ans in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{ans} x {counter[ans]}')

Submission status: Accepted

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

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

A=Counter(S)

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())
L = ["AC", "WA", "TLE", "RE"]
p = [0] * 4

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

for i in range(len(L)):
    print(L[i], "x", p[i])

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:
n = int(input())
p = [str(input()) for _ in range(n)]
print('AC x',p.count('AC'))
print('WA x', p.count('WA'))
print('TLE x', p.count('TLE'))
print('RE x',p.count('RE'))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
    s = input()
    d[s] += 1
for k, v in d.items():
    print(f'{k} x {v}')
exit()

Submission status: Accepted

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

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