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

cnt_AC = 0
cnt_WA = 0
cnt_TLE = 0
cnt_RE = 0

for i in range(N_size):
    str_input = input()
    if str_input == "AC":
        cnt_AC = cnt_AC + 1
    elif str_input == "WA":
        cnt_WA = cnt_WA + 1
    elif str_input == "TLE":
        cnt_TLE = cnt_TLE + 1
    elif str_input == "RE":
        cnt_RE = cnt_RE + 1

print("AC x " + str(cnt_AC))
print("WA x " + str(cnt_WA))
print("TLE x " + str(cnt_TLE))
print("RE x " + str(cnt_RE))

Submission status: Accepted

Solution code:
n = int(input())
ac = wa = tle = 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))

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
rmap = {
  "AC": 0,
  "WA": 0,
  "TLE": 0,
  "RE": 0,
}

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

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

for k in output_order:
  print("{} x {}".format(k, rmap[k]))

Submission status: Accepted

Solution code:
N=int(input())
li = [input() for i in range(N)]
a=b=c=d=0
for j in range(0,N):
  item=li[j]
  if item=="AC":
    a+=1
  elif item=="WA":
    b+=1
  elif item=="TLE":
    c+=1
  elif item=="RE":
    d+=1
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(a,b,c,d))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
  a = input()
  l.append(a)

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

Submission status: Accepted

Solution code:
c = int(input())
values = [input() for i in range(c)]
count = {}
keys = ['AC', 'WA', 'TLE', 'RE']
for key in keys:
        count[key] = 0

for value in values:
        count[value] = count[value] + 1

for key in keys:
        print(key + ' x ' + str(count[key]))

Submission status: Accepted

Solution code:
n = int(input())
list = []
c1,c2,c3,c4 = 0,0,0,0
for i in range(0,n):
  list.append(input())
for j in range(0,n):
  if list[j] == "AC":
    c1 = c1+1
  if list[j] == "WA":
    c2 = c2+1
  if list[j] == "TLE":
    c3 = c3+1
  if list[j] == "RE":
    c4 = c4+1
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(c1,c2,c3,c4))

Submission status: Accepted

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

import collections

c = collections.Counter(l)

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

Submission status: Accepted

Solution code:
n = int(input())
hoge = [0 for i in range(0,n)]
for i in range(0,n):
    hoge[i] = input()
    
AC_n = hoge.count('AC')
WA_n = hoge.count('WA')
TLE_n = hoge.count('TLE')
RE_n = hoge.count('RE')

result = {
	'AC': AC_n,
  	'WA': WA_n,
  	'TLE': TLE_n,
  	'RE': RE_n
}

for k, v in result.items():
  print('{} x {}'.format(k,v))

Submission status: Accepted

Solution code:

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

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

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 = int(input())
s = []
ac = 0
wa = 0
tle = 0
re = 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',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)

Submission status: Accepted

Solution code:
# coding: utf-8
N=int(input())
L=["AC","WA","TLE","RE"]
cnt=[0,0,0,0]

for i in range(N):
    s=input()
    for j in range(4):
        if s==L[j]:
            cnt[j]+=1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
A=[input() for i in range(n)]
ac=0
wa=0
tle=0
re=0
for i in range(n):
    if A[i]=="AC":
        ac+=1
    elif A[i]=="WA":
        wa+=1
    elif A[i]=="TLE":
        tle+=1
    else:
        re+=1
s=[ac,wa,tle,re]
h=["AC","WA","TLE","RE"]
for i in range(4):
    print(h[i]+" x "+str(s[i]))

Submission status: Accepted

Solution code:
N = int(input())
Nac = 0
Nwa = 0
Ntle = 0
Nre = 0
for i in range(N):
    a = input()
    if a == "AC":
        Nac += 1
    elif a == "WA":
        Nwa += 1
    elif a == "TLE":
        Ntle += 1
    elif a == "RE":
        Nre += 1

print("AC x %d" % Nac)
print("WA x %d" % Nwa)
print("TLE x %d" % Ntle)
print("RE x %d" % Nre)

Submission status: Accepted

Solution code:
N=int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  S=str(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:
# abc173_b.py
# https://atcoder.jp/contests/abc173/tasks/abc173_b
# B - Judge Status Summary /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 200点
# 問題文
# 高橋君は、プログラミングコンテスト AXC002 に参加しており、問題 A にコードを提出しました。
# この問題には N個のテストケースがあります。
# 各テストケース i(1≤i≤N) について、ジャッジ結果を表す文字列 Siが与えられるので、
# ジャッジ結果が AC, WA, TLE, RE であったものの個数をそれぞれ求めてください。

# 出力形式は、出力欄を参照してください。
# 制約
#     1≤N≤105
# Si は AC, WA, TLE, RE のいずれか

# 入力
# 入力は以下の形式で標準入力から与えられる。

# N
# S1
# ⋮
# SN

# 出力
# AC, WA, TLE, RE のテストケースの個数をそれぞれ C0, C1, C2, C3
# としたとき、以下の形式で出力せよ。

# AC x C0
# WA x C1
# TLE x C2
# RE x C3

# 入力例 1
# 6
# AC
# TLE
# AC
# AC
# WA
# TLE

# 出力例 1
# AC x 3
# WA x 1
# TLE x 2
# RE x 0

# ジャッジ結果が AC であったケースが 3個、WA であったケースが 1 個、
# TLE であったケースが 2 個、RE であったケースが 0個でした。

# 入力例 2
# 10
# AC
# AC
# AC
# AC
# AC
# AC
# AC
# AC
# AC
# AC

# 出力例 2
# AC x 10
# WA x 0
# TLE x 0
# RE x 0

# 解答
def abc173_b(lines):
    labels = ['AC', 'WA', 'TLE', 'RE']
    ns = [0, 0, 0, 0]
    for line in range(1, len(lines)):
        for i, label in enumerate(labels):
            if label == lines[line]:
                ns[i] += 1
    answers = list()
    for i, label in enumerate(labels):
        answers.append(label + ' x ' + str(ns[i]))
    return answers


# 引数を取得
def get_input_lines_1stline_as_n_lines():
    lines = list()
    lines.append(input())
    for _ in range(int(lines[0])):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['6', 'AC', 'TLE', 'AC', 'AC', 'WA', 'TLE']
        lines_export = ['AC x 3', 'WA x 1', 'TLE x 2', 'RE x 0']
    elif pattern == 2:
        lines_input = ['10', 'AC', 'AC', 'AC', 'AC', 'AC', 'AC', 'AC', 'AC', 'AC', 'AC']
        lines_export = ['AC x 10', 'WA x 0', 'TLE x 0', 'RE x 0']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines_1stline_as_n_lines()
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = abc173_b(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
count_ac=0
count_wa=0
count_tle=0
count_re=0
n=int(input())
for i in range(n):
    s=input()
    if s == "AC":
        count_ac += 1
    elif s == "WA":
        count_wa += 1
    elif s == "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())
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', ac)
print('WA x', wa)
print('TLE x', tle)
print('RE x', re)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
ac = wa = tle = re = 0
for i in range(N):
    Si = input()
    if Si == "AC":
        ac = ac + 1
    elif Si == "WA":
        wa = wa + 1
    elif Si == "TLE":
        tle = tle + 1
    elif Si == "RE":
        re = re + 1
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(ac, wa, tle, re))

Submission status: Accepted

Solution code:
N = int(input().rstrip())

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

for i in range(N):
    Si = input().rstrip()
    test_case[Si] += 1


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

Submission status: Accepted

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

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
N = int(input())
A = 0
T = 0
R = 0
W = 0
for i in range(N):
    S = input()
    if S == 'AC':
        A += 1
    elif S == 'WA':
        W += 1
    elif S == 'TLE':
        T += 1
    elif S == 'RE':
        R += 1


print('AC x',A)
print('WA x',W)
print('TLE x',T)
print('RE x',R)

Submission status: Accepted

Solution code:
N = int(input())
counter_val = ['AC', 'WA', 'TLE', 'RE']
counter = [0, 0, 0, 0]  # [AC, WA, TLE, RE]
LenOfCounter = 4

for _ in range(N):
    S = input()
    for i in range(LenOfCounter):
        if counter_val[i] == S:
            counter[i] += 1

for i in range(LenOfCounter):
    print('{} x {}'.format(counter_val[i], counter[i]))

Submission status: Accepted

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

    AC = 0
    WA = 0
    TLE = 0
    RE = 0
    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))

main()

Submission status: Accepted

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

def printf(tex: str, res):
  print(f"{tex} x {res[tex]}")

  
printf("AC", res)
printf("WA", res)
printf("TLE", res)
printf("RE", res)

Submission status: Accepted

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

for val in range(n):
  judge=input()
  if judge =='AC':
    ac=ac+1
  elif judge=='WA':
    wa=wa+1
  elif judge=='TLE':
    tle=tle+1
  elif judge=='RE':
    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):
  S.append(input())
ac = 0
wa = 0
tle = 0
re = 0

for x in S:
  if x == 'AC':
    ac += 1
  elif x == 'WA':
    wa += 1
  elif x == '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())
A = 0
W = 0
T = 0
R = 0
for k in range(n):
    s = str(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:
# coding: utf-8
d = {"AC":0, "WA":0, "TLE":0, "RE":0}
n = int(input())
for i in range(n):
    d[input()] += 1

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

Submission status: Accepted

Solution code:
N = int(input())
S = []
for _ 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:
s = open(0).read().count
for r in "AC", "WA", "TLE", "RE":
    print(r, "x", s(r))

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for _ in range(n)]
res = ["AC", "WA", "TLE", "RE"]

for r in res:
    print(r, "x", s.count(r))

Submission status: Accepted

Solution code:
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for _ in range(n):
	t = input()
	if t == 'AC':
		ac += 1
	elif t == 'WA':
		wa += 1
	elif t == '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())
ac, wa, tle, re = 0, 0, 0, 0
for _ in range(n):
    x = input()
    if x == "AC":
        ac += 1
    elif x == "WA":
        wa += 1
    elif x == "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())
c = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = ['-1' for _ in range(N+1)]
cases = ['AC', 'WA', 'TLE', 'RE']
C = dict(zip(cases, [0]*len(cases)))
for i in range(N):
  S[i+1] = input()
  C[S[i+1]] += 1
for case in cases:
  print('{} x {}'.format(case,str(C[case])))

Submission status: Accepted

Solution code:
num = int(input())

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

for _ in range(num):
    s = input()
    count[s] += 1

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 引数が一つだけのやつ
# n = int(input())
# 引数が複数あるやつ（全部数字）
# target = [int(x) for x in input().split()]

# 引数が複数あるやつ（そうじゃないの）
# target = [int(x) for x in input().split()]

# 最初の行で複数行を受け取って処理するやつ
number = int(input())
target = [input() for i in range(number)]

# 初期
result = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}

# 判定
for x in target:
    result[x] += 1

# 出力
for title, value in result.items():
    print(title + " x " + str(value))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    status = ['AC', 'WA', 'TLE', 'RE']
    counter ={}
    for key in status:
        counter[key] = 0
    for _ in range(N):
        s = input().rstrip()
        counter[s] += + 1
    for key in status:
        print(f"{key} x {counter[key]}")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for i in range(n)]
print(*['{} x {}'.format(k, s.count(k)) for k in ['AC', 'WA', 'TLE', 'RE']], sep='\n')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for a in range(n):
    s = input()
    if s == "AC":
        AC = AC + 1
    if s == "WA":
        WA = WA + 1
    if s == "TLE":
        TLE = TLE + 1
    if s == "RE":
        RE = 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 -*-
# 整数の入力
num = int(input())

c = [0,0,0,0]

for i in range(num):
    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 {}".format(c[0]))
print("WA x {}".format(c[1]))
print("TLE x {}".format(c[2]))
print("RE x {}".format(c[3]))

Submission status: Accepted

Solution code:
N = int(input(""))
si = []

for i in range(0, N):
    si.append(input(""))

c0 = si.count("AC")
c1 = si.count("WA")
c2 = si.count("TLE")
c3 = si.count("RE")

print("AC x", c0)
print("WA x", c1)
print("TLE x", c2)
print("RE x", c3)

Submission status: Accepted

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

def main():

    N = int(input())

    S = []
    nameC = ['AC', 'WA', 'TLE', 'RE']
    C = [0, 0, 0, 0]

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

    for i in S:
        if i == nameC[0]:
            C[0] += 1

        elif i == nameC[1]:
            C[1] += 1

        elif i == nameC[2]:
            C[2] += 1

        elif i == nameC[3]:
            C[3] += 1

    for i in range(len(C)):
        print(nameC[i], 'x', C[i])
    

if __name__ == "__main__":
    main()

Submission status: Accepted

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

answer_dict = {}

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

for i in answer_list:
    answer_dict[i] = 0

for i in input_list:
    answer_dict[i] += 1
        
for key in answer_list:
    item_num = answer_dict[key]
    print(f"{key} x {item_num}")

Submission status: Accepted

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

cnt =  Counter(S)

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

Submission status: Accepted

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

b=s.count('AC')
c=s.count('WA')
d=s.count('TLE')
e=s.count('RE')

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

Submission status: Accepted

Solution code:
N = int(input())

cnt = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(N):
  cnt[input()]+=1
  
for k,v in cnt.items():
  print(k,'x',v)

Submission status: Accepted

Solution code:
n = int(input())
acc = 0
wac = 0
tlec = 0
rec = 0
for i in range(n):
  x = str(input())
  if x == "AC":
    acc = acc + 1
  elif x == "WA":
    wac = wac + 1
  elif x == "TLE":
    tlec = tlec + 1
  elif x == "RE":
  	rec = rec + 1

print("AC x "+str(acc))
print("WA x "+str(wac))
print("TLE x "+str(tlec))
print("RE x "+str(rec))

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(n):
    s=input()
    l.append(s)
a=l.count("AC")
b=l.count("WA")
c=l.count("TLE")
d=l.count("RE")
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)

Submission status: Accepted

Solution code:
n = int(input())

A = [0]*4

for _ in range(n):
    n = input()
    if n == "AC":
        A[0] += 1
    elif n == "WA":
        A[1] += 1
    elif n == "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:
n = int(input())
words = {"AC":0, "WA":0, "TLE":0, "RE":0}
for i in range(n):
  a = input()
  words[a] += 1
print("AC x " + str(words["AC"]))
print("WA x " + str(words["WA"]))
print("TLE x " + str(words["TLE"]))
print("RE x " + str(words["RE"]))

Submission status: Accepted

Solution code:
N = int(input())
a, w, t, r = 0, 0, 0, 0
for _ 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 ' + 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())
list = [input() for i in range(N)]
print("AC x " + str(list.count("AC")))
print("WA x " + str(list.count("WA"))) 
print("TLE x " + str(list.count("TLE")))
print("RE x " + str(list.count("RE")))

Submission status: Accepted

Solution code:
n = int(input())
#a, b = map(int, input().split())
#l = list(map(int, input().split()))
#s = input()

acCnt = 0
waCnt = 0
tlCnt = 0
reCnt = 0

for i in range(n):
    s = input()
    if s == "AC":
        acCnt = acCnt + 1
    elif s == "WA":
        waCnt = waCnt + 1
    elif s == "TLE":
        tlCnt = tlCnt + 1
    else:
        reCnt = reCnt + 1

print ("AC x",acCnt)
print ("WA x",waCnt)
print ("TLE x",tlCnt)
print ("RE x",reCnt)

Submission status: Accepted

Solution code:
#/usr/bin/python

def solve():
    n = int(input())
    s = [input() for i in range(n)]
    ans = ''
    for v in ['AC', 'WA', 'TLE', 'RE']:
        ans += "{0} x {1}\n".format(v, s.count(v))
    return ans

print(solve())

Submission status: Accepted

Solution code:
n = int(input())

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

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


for key, value in count.items():
    print(key + ' x ' + str(value))

Submission status: Accepted

Solution code:
n =  int(input())
ac = 0
tle = 0
re = 0
wa = 0
for i in range(n):
    string = input()
    if string == "AC":
        ac += 1
    if string == "WA":
        wa += 1
    if string == "TLE":
        tle += 1
    if string == "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:
dict={'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(int(input())):
	x=input()
	if x in dict:
		dict[x]+=1
for i in dict:
	print (str(i)+" x "+str(dict[i]))

Submission status: Accepted

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


def main():
    n = int(readline().rstrip())
    s = [readline().rstrip() for _ in range(n)]
    c = Counter(s)
    lis = ['AC', 'WA', 'TLE', 'RE']
    for li in lis:
        print(li+' x ' + str(c[li]))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
n=int(input())
L=[input() for i in range(n)]
LC=Counter(L)

A=['AC', 'WA', 'TLE', 'RE']
for a in A:
    if a in LC.keys():
        print(a+' x '+str(LC[a]))
    else:
        print(a+' x '+'0')

Submission status: Accepted

Solution code:
ac, wa, tle, re = 0, 0, 0, 0
n = int(input())
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 ' + 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]*N
AC = 0
WA = 0
TLE = 0
RE = 0

for n in range(N):
  S[n] = str(input())
  if S[n] == "AC":
    AC = AC + 1
  elif S[n] == "WA":
    WA = WA + 1
  elif S[n] == "TLE":
    TLE = TLE + 1
  elif S[n] == "RE":
    RE = RE + 1
    
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(AC,WA,TLE,RE))

Submission status: Accepted

Solution code:
n=int(input())
num1=0
num2=0
num3=0
num4=0
for i in range(n):
    x=input()
    if x=="AC":
        num1+=1
    elif x=="WA":
        num2+=1
    elif x=="TLE":
        num3+=1
    elif x=="RE":
        num4+=1
print(f"AC x {num1}\nWA x {num2}\nTLE x {num3}\nRE x {num4}")

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
rl = sys.stdin.buffer.readline
read = sys.stdin.buffer.read

N = int(rl())
SL = read().split()

A, W, T, R = ord('A'), ord('W'), ord('T'), ord('R')
na, nw, nt, nr = 0, 0, 0, 0
for s in SL:
  if s[0] == A:
    na += 1
  elif s[0] == W:
    nw += 1
  elif s[0] == T:
    nt += 1
  elif s[0] == R:
    nr += 1

print('AC x ' + str(na))
print('WA x ' + str(nw))
print('TLE x ' + str(nt))
print('RE x ' + str(nr))

Submission status: Accepted

Solution code:
N = int(input())
S = []
for _ 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())
lst = [None for i in range(n)]
for i in range(n):
    lst[i] = input()

count = [0,0,0,0]
for i in lst:
    if i=="AC":
        count[0]+=1
    elif i=="WA":
        count[1]+=1
    elif i=="TLE":
        count[2]+=1
    else:
        count[3]+=1

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

Submission status: Accepted

Solution code:
res = {"AC":0,"WA":0,"TLE":0,"RE":0}
a = int(input())
b = [input() for i in range(a)]
for l in b:
  res[l] +=1

for k,v in res.items():
  print(k + " x " + str(v))

Submission status: Accepted

Solution code:
a=int(input())
b=[input() for i in range(a)]
c=["AC","WA","TLE","RE"]
for value in c:
  print('{0} x {1}'.format(value, b.count(value)))

Submission status: Accepted

Solution code:
n=int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i 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())
ans={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  res = input()
  ans[res] += 1
for i in ["AC","WA","TLE","RE"]:
  print(i,"x",ans[i])

Submission status: Accepted

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

#ac,wa,tle,re
result = ["AC", "WA", "TLE", "RE"]
li = [0]*4

for i in s:
	li[result.index(i)] += 1

for i in range(4):
	print(result[i], "x", li[i])

Submission status: Accepted

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

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

for i in range(N):
    s = input()
    S.append(s)

for si in S:
    if si == 'AC':
        ac += 1
    elif si == 'WA':
        wa += 1
    elif si == 'TLE':
        tle += 1
    else:
        re += 1

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

Submission status: Accepted

Solution code:
from collections import Counter

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

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

Submission status: Accepted

Solution code:
N=input()
C_0=0
C_1=0
C_2=0
C_3=0
for i in range(int(N)):
    S_i=input()
    if S_i=='AC':
        C_0=C_0+1
    elif S_i=='WA':
        C_1=C_1+1
    elif S_i=='TLE':
        C_2=C_2+1
    else:
        C_3=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:
l=[]    
acnt=0
wcnt=0
tcnt=0
rcnt=0
for _ in range(int(input())):
    l= list(map(str,input().split('\n')))
    for i in range(len(l)):
        if l[i]=='AC':
            acnt+=1
        elif l[i]=='WA':
            wcnt+=1
        elif l[i]=='TLE':
            tcnt+=1
        else:
            rcnt+=1
    
print("AC x "+str(acnt))
print("WA x "+str(wcnt))
print("TLE x "+str(tcnt))
print("RE x "+str(rcnt))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
num=int(input())

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

for i in range(num):
    x=input()
    if x=="AC":
        AC+=1
    elif x=="WA":
        WA+=1
    elif x=="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:
a =int(input())
resultList=[]
for i in range(a):
  resultList.append(input())
print('AC x '+str(resultList.count('AC')))
print('WA x '+str(resultList.count('WA')))
print('TLE x '+str(resultList.count('TLE')))
print('RE x '+str(resultList.count('RE')))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
import itertools
import math
import sys
from typing import *

INF = float('inf')


def solve(N: int, S: "List[str]"):
    return "\n".join([f'{v} x {S.count(v)}' for v in ["AC", "WA", "TLE", "RE"]])


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [next(tokens) for _ in range(N)]  # type: "List[str]"
    print(solve(N, S))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
lis = []
n = int(input())
for i in range(n):
    p = input()
    lis.append(p)
ac = lis.count("AC")
wa = lis.count("WA")
tle = lis.count("TLE")
re = lis.count("RE")
print("AC x",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)