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())
C = [0] * 4
for _ in range(N):
    s = str(input())
    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', 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())
c = [0]*4
for _ in range(n):
    s = str(input())
    if s == 'AC':
        c[0] += 1
    elif s == 'WA':
        c[1] += 1
    elif s == 'TLE':
        c[2] += 1
    else:
        c[3] += 1

print('AC x '+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:
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 = [input() for _ in range(N)]

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

for s in S:
    res[s] += 1

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

Submission status: Accepted

Solution code:
import collections

N = int(input())
ans = []
for _ in range(N):
    ans.append(input())

c = collections.Counter(ans)

if 'AC' in c:
    print('AC x', c['AC'])
else:
    print('AC x', 0)

if 'WA' in c:
    print('WA x', c['WA'])
else:
    print('WA x', 0)

if 'TLE' in c:
    print('TLE x', c['TLE'])
else:
    print('TLE x', 0)

if 'RE' in c:
    print('RE x', c['RE'])
else:
    print('RE x', 0)

Submission status: Accepted

Solution code:
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
    s=input()
    if s == "AC":
        ac+=1
    elif s == "WA":
        wa+=1
    elif s == "TLE":
        tle+=1
    else:
        re+=1
print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    S = [input().rstrip() for i in range(N)]
    R = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    for i in S:
        R[i] += 1
    print('AC x {}'.format(R['AC']))
    print('WA x {}'.format(R['WA']))
    print('TLE x {}'.format(R['TLE']))
    print('RE x {}'.format(R['RE']))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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


def solve(N: int, S: "List[str]"):
    from collections import Counter
    C = Counter(S)
    for st in ["AC", "WA", "TLE", "RE"]:
        print("{} x {}".format(st, C[st]))

# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [next(tokens) for _ in range(N)]  # type: "List[str]"
    solve(N, S)

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    #test()
    main()

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 == 'WA':
        c1 += 1
    elif s == 'TLE':
        c2 += 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:
#!python3

import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())
from collections import Counter

def resolve():
    it = iter(sys.stdin.read().split())
    N = int(next(it))
    cc = Counter(it)

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

## Library

import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter
import itertools
import copy

## input

# N=int(input())
# A,B,C,D=map(int, input().split())
# S = input()
# yoko = list(map(int, input().split()))
# tate = [int(input()) for _ in range(N)]
# N, M = map(int,input().split()) 
#    P = [list(map(int,input().split())) for i in range(M)]
#    S = []
#    for _ in range(N):
#        S.append(list(input()))

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:
# B - Judge Status Summary

N = int(input())

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

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

Submission status: Accepted

Solution code:
import sys
## io ##
def IS(): return sys.stdin.readline().rstrip()
def II(): return int(IS())
def MII(): return list(map(int, IS().split()))
def MIIZ(): return list(map(lambda x: x-1, MII()))
#======================================================#
def main():
    n = II()
    res = {
        'AC': 0,
        'WA': 0,
        'TLE': 0,
        'RE': 0}
    for i in range(n):
        res[IS()] += 1
    for k,v in res.items():
        print('{} x {}'.format(k, v))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)]
AC = 0
WA = 0
TLE = 0
RE = 0

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

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

Submission status: Accepted

Solution code:
#import numpy as np
#import functools
#import operator
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as comb_with
#from itertools import permutations as perm
#import collections as C #most_common
#import math
#import sympy

N = int(input())
#A,B= map(int,input().split())
#P = list(map(int,input().split()))
#S = str(input())
#T = str(input())
a=0
b=0
c=0
d=0
for i in range(N):
    S = str(input())
    if S=='AC':
        a+=1
    elif S=='WA':
        b+=1
    elif S=='TLE':
        c+=1
    else:
        d+=1

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

Submission status: Accepted

Solution code:
n = int(input())
num_ac = 0
num_wa = 0
num_tle = 0
num_re = 0

for i in range(n):
    s = input()
    if s == "AC":
        num_ac += 1
    elif s == "WA":
        num_wa += 1
    elif s == "TLE":
        num_tle += 1
    elif s == "RE":
        num_re += 1


print("AC x {}".format(num_ac))
print("WA x {}".format(num_wa))
print("TLE x {}".format(num_tle))
print("RE x {}".format(num_re))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
from collections import defaultdict
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


# 処理内容
def main():
    N = int(input())
    d = defaultdict(int)
    for _ in range(N):
        S = input()[:-1]
        d[S] += 1
    
    print("AC x " + str(d["AC"]))
    print("WA x " + str(d["WA"]))
    print("TLE x " + str(d["TLE"]))
    print("RE x " + str(d["RE"]))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
_MULTITEST = False
##
def solve():
    D = {
        "AC" : 0,
        "WA" : 0,
        "TLE" : 0,
        "RE" : 0
    }

    n = int(input())
    for i in range(n):
        verdict = str(input())
        D[verdict] = D[verdict]+1
    print("AC x ", D["AC"])
    print("WA x ", D["WA"])
    print("TLE x ", D["TLE"])
    print("RE x ", D["RE"])

##
if __name__ == "__main__":
    t = (int(input()) if _MULTITEST else 1)
    for tt in range(t):
        solve()

Submission status: Accepted

Solution code:
import sys
import collections

def main():
    n = int(input())
    s = collections.Counter([i.rstrip() for i in sys.stdin.readlines()])
    for x in ["AC", "WA", "TLE", "RE"]:
        print(x, "x", s[x])

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
    if s == 'WA':
        wa += 1
    if s == 'TLE':
        tle += 1
    if s == 'RE':
        re += 1

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

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

n=ni()

j = dict()
j['AC']=0
j['WA']=0
j['TLE']=0
j['RE']=0
for i in range(n):
  s=input()
  j[s]+=1

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy

# If you use recursive call, uncomment this code
#sys.setrecursionlimit(10**6)

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = [0]*4
for i in range(n):
  j = input()
  if j == "AC":
    l[0] += 1
  if j == "WA":
    l[1] += 1
  if j == "TLE":
    l[2] += 1
  if j == "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:
#!/usr/bin/env python3

from pprint import pprint
import sys

sys.setrecursionlimit(10 ** 6)
INF = float('inf')


n = int(input())
str_list = []
for _ in range(n):
    s = str(input())
    str_list.append(s)
# print(str_list)

res = [0] * 4

for s in str_list:
    if s == 'AC':
        res[0] += 1
    if s == 'WA':
        res[1] += 1
    if s == 'TLE':
        res[2] += 1
    if s == 'RE':
        res[3] += 1

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

Submission status: Accepted

Solution code:
a=int(input())
A=0
W=0
T=0
R=0
for i in range(a):
  tex=input()
  if tex=="AC":
    A+=1
  elif tex=="WA":
    W+=1
  elif tex=="TLE":
    T+=1
  elif tex=="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:
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(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 sys import stdin


def main():
    _in = [_.rstrip() for _ in stdin.readlines()]
    N = int(_in[0])  # type:int
    S_arr = []
    for i in range(N):
        _ = _in[i+1]
        S_arr.append(_)
    # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
    c_arr = [0] * 4
    for S in S_arr:
        if S == 'AC':
            c_arr[0] += 1
        elif S == 'WA':
            c_arr[1] += 1
        elif S == 'TLE':
            c_arr[2] += 1
        else:
            c_arr[3] += 1
    # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    print(f'AC x {c_arr[0]}')
    print(f'WA x {c_arr[1]}')
    print(f'TLE x {c_arr[2]}')
    print(f'RE x {c_arr[3]}')


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
A =[]
for i in range(N):
  A.append(input())
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 python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def main():
    n = int(input())
    s = [input() for _ 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
        elif i == "RE":
            re += 1

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


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import Counter


N = int(input())
S = [input() for _ in range(N)]
C = Counter(S)
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, b, c, d = 0, 0, 0, 0
for i in range(n):
    s = input()
    if s == 'AC': a -= -1
    if s == 'WA': b -= -1
    if s == 'TLE': c -= -1
    if s == 'RE': 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())
a = 0
w = 0
t = 0
r = 0

for i in range(N):
    s = input()
    if s == 'AC':
        a += 1
    elif s == 'WA':
        w += 1
    elif s == 'TLE':
        t += 1
    else:
        r += 1

print('AC x '+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 defaultdict

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

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

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
    elif a == "WA":
        WA += 1
    elif a == "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:
#!python3.8
# -*- coding: utf-8 -*-
# abc173/abc173_b
import sys
from collections import Counter

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N = i2n()
    cntr = Counter()
    for _ in range(N):
        S = i2s()
        cntr[S] += 1
    print(f'AC x {cntr["AC"]}')
    print(f'WA x {cntr["WA"]}')
    print(f'TLE x {cntr["TLE"]}')
    print(f'RE x {cntr["RE"]}')
    return

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

Submission status: Accepted

Solution code:
def resolve():
    from collections import defaultdict
    n = int(input())
    d = defaultdict(int)
    for i in range(n):
        d[input()] += 1
    print("AC x " + str(d["AC"]))
    print("WA x " + str(d["WA"]))
    print("TLE x " + str(d["TLE"]))
    print("RE x " + str(d["RE"]))


if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
from collections import defaultdict
n=int(input())
s=defaultdict(int)
for i in range(n):
    s[input()]+=1
print("AC x",s["AC"])
print("WA x",s["WA"])
print("TLE x",s["TLE"])
print("RE x",s["RE"])

Submission status: Accepted

Solution code:
n = int(input())

a = [0,0,0,0]

for i in range(n):
  s = input()
  if s == "AC":
    a[0] += 1
  elif s== "WA":
    a[1] += 1
  elif s == "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())
temp = [0, 0, 0, 0]
for i in range(N):
    s = input()
    if s == "AC":
        temp[0] += 1
    elif s == "WA":
        temp[1] += 1
    elif s == "TLE":
        temp[2] += 1
    else:
        temp[3] += 1

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

import collections
N = ri()
S = [rs() for i in range(N)]
d = collections.Counter(S)
print('AC x ', d['AC'], sep='')
print('WA x ', d['WA'], sep='')
print('TLE x ', d['TLE'], sep='')
print('RE x ', d['RE'], sep='')

Submission status: Accepted

Solution code:
N = int(input())

count = [0, 0, 0, 0]
for i in range(N):
    out = input()
    if out == "AC":
        count[0] += 1
    elif out == "WA":
        count[1] += 1
    elif out == "TLE":
        count[2] += 1
    elif out == "RE":
        count[3] += 1

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

Submission status: Accepted

Solution code:
# input()
# int(input())
# map(int, input().split())
# list(map(int, input().split()))
# list(map(int, list(input()))) # スペースがない数字リストを読み込み
import math
import fractions
import sys
import bisect
import heapq  # 優先度付きキュー(最小値取り出し)
import collections
from collections import Counter
from collections import deque
import pprint
import itertools

sr = lambda: input()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

"""nを素因数分解"""
"""2以上の整数n => [[素因数, 指数], ...]の2次元リスト"""


def factorization(n):
    arr = []
    temp = n
    if n == 1:
        return arr

    for i in range(2, int(-(-n ** 0.5 // 1)) + 1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


# a^n
def power(a, n, mod):
    x = 1
    while n:
        if n & 1:
            x *= a % mod
        n >>= 1
        a *= a % mod
    return x % mod


# n*(n-1)*...*(l+1)*l
def kaijo(n, l, mod):
    if n == 0:
        return 1
    a = n
    tmp = n - 1
    while (tmp >= l):
        a = a * tmp % mod
        tmp -= 1
    return a


inf = 10 ** 18
mod = 10 ** 9 + 7

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = list(input().rstrip() for _ in range(N))
c = Counter(S)

for k in ['AC', 'WA', 'TLE', 'RE']:
    count = c.get(k)
    if count is None:
        count = 0
    print('{} x'.format(k), count)

Submission status: Accepted

Solution code:
N=int(input())
dic={"AC":0,"WA":0,"TLE":0,"RE":0}
for i 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())
a=0
b=0
c=0
d=0
for _ in range(n):
    g=input()
    if g=="AC":
        a+=1
    if g=="WA":
        b+=1
    if g=="TLE":
        c+=1    
    if g=="RE":
        d+=1
print("AC x "+str(a))
print("WA x "+str(b))
print("TLE x "+str(c))
print("RE x "+str(d))

Submission status: Accepted

Solution code:
n = int(input())
 
ac_counter = 0
wa_counter = 0
tle_counter = 0
re_counter = 0
 
for i in range(n):
  str = input()
  if str == "AC":
    ac_counter += 1
  elif str == "WA":
    wa_counter += 1
  elif str == "TLE":
    tle_counter += 1
  else :
    re_counter += 1
print("AC x",ac_counter)
print("WA x",wa_counter)
print("TLE x",tle_counter)
print("RE x",re_counter)

Submission status: Accepted

Solution code:
N = int(input())
S=[]
for i in range(N):
  s=input()
  S.append(s)
  
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())
d = {"AC": 0, "WA": 0, "RE": 0, "TLE": 0}
for i in range(n):
    a = input()
    if a == "AC":
        d["AC"] += 1
    elif a == "WA":
        d["WA"] += 1
    elif a == "RE":
        d["RE"] += 1
    elif a == "TLE":
        d["TLE"] += 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())
ac=0
wa=0
tle=0
re=0
for i in range(n):
    s=input()
    if s=="AC":
        ac=ac+1
    elif s=="WA":
        wa=wa+1
    elif s=="TLE":
        tle=tle+1
    else:
        re=re+1
print("AC x ",end="")
print(ac)
print("WA x ",end="")
print(wa)
print("TLE x ",end="")
print(tle)
print("RE x ",end="")
print(re)

Submission status: Accepted

Solution code:
import math 

n = int(input())

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

for i in range(n):
	s = input()
	if s == "AC":
		ac += 1
	elif s == "RE":
		re += 1
	elif s == "WA":
		wa += 1
	else:
		tle += 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())
temp=[0]*4
ans=["AC","WA","TLE","RE"]
for i in range(n):
    s=input()
    for k,j in enumerate(ans):
        if s==j: temp[k]+=1
for i in range(4):
    print(ans[i]+" x "+str(temp[i]))

Submission status: Accepted

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

lst = ['AC', 'WA', 'TLE', 'RE']
for i in range(4):
    print(lst[i], 'x', ans[i])

Submission status: Accepted

Solution code:
## coding: UTF-8

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

Submission status: Accepted

Solution code:
from collections import Counter

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

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import deque

sys.setrecursionlimit(1000000)
MOD = 10 ** 9 + 7
input = lambda: sys.stdin.readline().strip()
NI = lambda: int(input())
NMI = lambda: map(int, input().split())
NLI = lambda: list(NMI())
SI = lambda: input()


def make_grid(h, w, num): return [[int(num)] * w for _ in range(h)]


def main():
    N = NI()
    D = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
    for i in range(N):
        D[SI()] += 1
    for x, y in D.items():
        print("{0} x {1}".format(x, y))


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):
    temp = input()
    if(temp == "AC"):
        ac += 1
    elif(temp == "WA"):
        wa += 1
    elif(temp == "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 fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations

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

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

    for ans in res:
        print(ans + ' x ' + str(S.count(ans)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
number = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(number):
    now = input()
    if now == "AC":
        ac += 1
    elif now == "WA":
        wa += 1
    elif now == "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 = [input() for _ in range(n)]

cs = ('AC', 'WA', 'TLE', 'RE')

for c in cs:
  print('{} x {}'.format(c, s.count(c)))

Submission status: Accepted

Solution code:
n = int(input())
ac, wa, tle, re = 0,0,0,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:
from collections import Counter

input = raw_input

n = int(input())
words = [input() for i in range(n)]
c = Counter(words)

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

Submission status: Accepted

Solution code:
# Author: S Mahesh Raju
# Username: maheshraju2020
# Date: 05/07/2020

from sys import stdin,stdout
from math import gcd, ceil, sqrt
from collections import Counter
ii1 = lambda: int(stdin.readline().strip())
is1 = lambda: stdin.readline().strip()
iia = lambda: list(map(int, stdin.readline().strip().split()))
isa = lambda: stdin.readline().strip().split()
mod = 1000000007

n = ii1()
arr = []
for i in range(n):
    arr.append(is1())
d = Counter(arr)
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(i + ' x ' + str(d[i]))