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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

N = int(input())
d = Counter()
for n in range(N):
    tmp = input()
    d[tmp] += 1
for key in ['AC', 'WA', 'TLE', 'RE']:
    print("{} x {}".format(key, d[key]))

Submission status: Accepted

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

Submission status: Accepted

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

    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
        elif s[i] == 'RE':
            re += 1

    print(f'AC x {ac}')
    print(f'WA x {wa}')
    print(f'TLE x {tle}')
    print(f'RE x {re}')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
c = Counter()
for _ in range(N):
    s = input()
    c[s] += 1

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

Submission status: Accepted

Solution code:
N=int(input())
from collections import defaultdict
dic=defaultdict(int)
for _ in range(N):
    dic[input()]+=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())
S = [input() for _ in range(N)]

C_ac = 0
C_wa = 0
C_tle = 0
C_re = 0
for s in S:
    if s == 'AC':
        C_ac += 1
    elif s == 'WA':
        C_wa += 1
    elif s == 'TLE':
        C_tle += 1
    elif s == 'RE':
        C_re += 1

print(f'AC x {C_ac}')
print(f'WA x {C_wa}')
print(f'TLE x {C_tle}')
print(f'RE x {C_re}')

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
	else:
		ans[3]+=1
print("AC x",ans[0])
print("WA x",ans[1])
print("TLE x",ans[2])
print("RE x",ans[3])

Submission status: Accepted

Solution code:
# coding:utf-8

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from collections import Counter
N = int(input())
S = [input().strip() for i in range(N)]

cnt = Counter(S)

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

ans = [0, 0, 0, 0]

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
    else:
        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:
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
        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}")

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

def solve():
    codes = ['AC', 'WA', 'TLE', 'RE']
    N = int(readline())
    count = {code: 0 for code in codes}
    for i in range(N):
        a = readline().rstrip()
        count[a] += 1
    
    for code in codes:
        print(f'{code} x {count[code]}')


solve()

Submission status: Accepted

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

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

for t in ('AC', 'WA', 'TLE', 'RE'):
    print(t, ' x ', C[t])

Submission status: Accepted

Solution code:
# N, M = [int(_) for _ in input().split()]
N = int(input())
count = {"AC": 0, "WA": 0, "TLE": 0, "RE":0}
for i in range(N):
  S = input()
  count[S] += 1

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

Submission status: Accepted

Solution code:
import math

n = int(input())
d = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(n):
    inp = input()
    if inp in d:
        d[inp] += 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:
#!/usr/bin/env python3
from collections import deque, Counter
from heapq import heappop, heappush
from bisect import bisect_right

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
ac = 0
wa = 0
tle = 0
re = 0

n = int(input())

for _ in range(n):
    result = input()
    if result == "AC":
        ac += 1
    if result == "WA":
        wa += 1
    if result == "TLE":
        tle += 1
    if result == "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

def main():
    n = int(input())
    lst = []
    for _ in range(n):
        lst.append(input())
    c = Counter(lst)

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict
d = defaultdict(int)
for _ in range(int(input())):
    s = input()
    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"]))

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(f'AC x {ac}')
print(f'WA x {wa}')
print(f'TLE x {tle}')
print(f'RE x {re}')

Submission status: Accepted

Solution code:
# import sys
# readline = sys.stdin.readline
# generator = (readline().strip() for _ in range(N))

# N, M = map(int, input().split())
# As = list(map(int, input().split()))
# queries = (input() for _ in range(N))


def solve():
    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}')


def main():
    solve()


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 8)

def Z(): return int(input())
def ZZ(): return [int(_) for _ in input().split()]

def main():
    AC = WA = TLE = RE = 0
    N = Z()
    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))

    return

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 {}'.format(c['AC']))

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

Submission status: Accepted

Solution code:
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 " + str(AC))
print("WA x " + str(WA))
print("TLE x " + str(TLE))
print("RE x " + str(RE))

Submission status: Accepted

Solution code:
import math
import sys
from itertools import permutations
input = sys.stdin.readline

arr=[0]*4
N=int(input())
for i in range(N):
    s=input()
    if s[-1]=="\n":
        s=s[:-1]
    if s=='AC':
        arr[0]+=1
    elif s=='WA':
        arr[1]+=1
    elif s=='TLE':
        arr[2]+=1
    elif s=='RE':
        arr[3]+=1

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
C = Counter()
for i in range(N):
    si = input()
    C[si] += 1
for s in ['AC', 'WA', 'TLE', 'RE']:
    print(s, 'x', C[s])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
c = Counter(S)
# print(f'{c=}')

print(f'AC x {c.get("AC", 0)}')
print(f'WA x {c.get("WA", 0)}')
print(f'TLE x {c.get("TLE", 0)}')
print(f'RE x {c.get("RE", 0)}')

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict, Counter, namedtuple, deque
import itertools
import functools
import bisect
import heapq
import math
# from fractions import gcd

MOD = 10 ** 9 + 7
# MOD = 998244353
# sys.setrecursionlimit(10**8)


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    S = [input() for _ in range(N)]
    ans = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
    for s in S:
        ans[s] += 1
    for key in ans:
        print(key + " x " + str(ans[key]))


resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
###==================================================
### import
#import bisect
from collections import Counter, deque, defaultdict
#from copy import deepcopy
#from functools import reduce, lru_cache
#from heapq import heappush, heappop
#import itertools
#import math
#import string
import sys
### stdin
def input(): return sys.stdin.readline().rstrip()
def iIn(): return int(input())
def iInM(): return map(int, input().split())
def iInM1(): return map(int1, input().split())
def iInLH(): return list(map(int, input().split()))
def iInLH1(): return list(map(int1, input().split()))
def iInLV(n): return [iIn() for _ in range(n)]
def iInLV1(n): return [iIn()-1 for _ in range(n)]
def iInLD(n): return [iInLH() for _ in range(n)]
def iInLD1(n): return [iInLH1() for _ in range(n)]
def sInLH(): return list(input().split())
def sInLV(n): return [input().rstrip('\n') for _ in range(n)]
def sInLD(n): return [sInLH() for _ in range(n)]
### stdout
def OutH(lst, deli=' '): print(deli.join(map(str, lst)))
def OutV(lst): print('\n'.join(map(str, lst)))
### setting
sys.setrecursionlimit(10 ** 6)
### utils
int1 = lambda x: int(x) - 1
### constants
INF = int(1e9)
MOD = 1000000007
dx = (-1, 0, 1, 0)
dy = (0, -1, 0, 1)
###---------------------------------------------------

N = iIn()
S = sInLV(N)

n_ac = 0
n_wa = 0
n_tle = 0
n_re = 0
for i in range(N):
    if S[i] == 'AC':
        n_ac += 1
    elif S[i] == 'WA':
        n_wa += 1
    elif S[i] == 'TLE':
        n_tle += 1
    else:
        n_re += 1

print('AC x', n_ac)
print('WA x', n_wa)
print('TLE x', n_tle)
print('RE x', n_re)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import bisect
import heapq
import math
import random
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub


import sys
# sys.setrecursionlimit(10**6)
# buff_readline = sys.stdin.buffer.readline
buff_readline = sys.stdin.readline
readline = sys.stdin.readline

INF = 2**62-1


def read_int():
    return int(buff_readline())


def read_int_n():
    return list(map(int, buff_readline().split()))


def read_float():
    return float(buff_readline())


def read_float_n():
    return list(map(float, buff_readline().split()))


def read_str():
    return readline().strip()


def read_str_n():
    return readline().strip().split()

def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(N, S):
    c = Counter(S)
    print('AC x %d'% c['AC'])
    print('WA x %d' % c['WA'])
    print('TLE x %d' % c['TLE'])
    print('RE x %d' % c['RE'])


def main():
    N = read_int()
    S = [read_str() for _ in range(N)]
    (slv(N, S))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

cnt = Counter(Sss)
#print('cnt:', cnt)

ress = ['AC', 'WA', 'TLE', 'RE']
for res in ress:
    print(res + ' x ' + str(cnt[res]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
c = [0,0,0,0]
for i in range(N):
    s = 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", c[0])
print("WA x", c[1])
print("TLE x", c[2])
print("RE x", c[3])

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    N = int(input())
    #N, K = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    L = tuple(input() for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列
    s=Counter(L)
    print("AC x "+str(s["AC"]))
    print("WA x "+str(s["WA"]))
    print("TLE x "+str(s["TLE"]))
    print("RE x "+str(s["RE"]))






if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict

def solve():
    input = sys.stdin.readline
    N = int(input())
    C = defaultdict(int)
    for _ in range(N):
        s = input().strip("\n")
        C[s] += 1
    P = ["AC", "WA", "TLE", "RE"]

    for p in P:
        print(p + " x " + str(C[p]))
    return 0

if __name__ == "__main__":
    solve()

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

Submission status: Accepted

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

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] += 1

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

Submission status: Accepted

Solution code:
n = int(input())

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

for i in range(n):
    s = input() #sys.stdin.readlineは最後が改行
    count[s]+=1


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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

from collections import Counter

def ri():
    return int(input())

def rl():
    return list(input().split())

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

def main():
    n = ri()
    cnt = Counter()
    for i in range(n):
        s = input()
        cnt[s] += 1
    for st in ["AC", "WA", "TLE", "RE"]:
        print("{} x {}".format(st, cnt[st]))
    


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import os
import sys
from io import BytesIO, IOBase

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")
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
INF = 10 ** 18
MOD = 10**9+7

Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()

n = int(ri())
dic = {'AC': 0,'WA': 0,'TLE': 0,'RE': 0}
for i in range(n):
    s = ri()
    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())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(N):
    s = input()
    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']))

Submission status: Accepted

Solution code:
n=int(input())
account=0
wacount=0
tlecount=0
recount=0
for i in range(n):
  s=input()
  if s=='AC':
    account+=1
  if s=='WA':
    wacount+=1
  if s=='TLE':
    tlecount+=1
  if s=='RE':
    recount+=1
print('AC x',account)
print('WA x',wacount)
print('TLE x',tlecount)
print('RE x',recount)

Submission status: Accepted

Solution code:
N = int(input())

cnt = [0] * 4

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

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

Submission status: Accepted

Solution code:
N = int(input())
s = []
for i in range(N):
    s.append(input())
ans = [0 for _ in range(4)]
for i in range(N):
    if s[i] == "AC":  ans[0] += 1
    elif s[i] == "WA":  ans[1] += 1
    elif s[i] == "TLE":   ans[2] += 1
    else:  ans[3] += 1
print("AC x {}".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:
code = ['AC', 'WA', 'TLE', 'RE']
ans = {c: 0 for c in code}
n = int(input())
for _ in range(n):
  s = input()
  ans[s] += 1
  
for c in code:
  print(c+' x '+str(ans[c]))

Submission status: Accepted

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

l = [input() for i in range(n)]

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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    N = I()
    d = collections.defaultdict(int)
    for i in range(N):
        s = S()
        d[s] += 1
    for s in ['AC', 'WA', 'TLE', 'RE']:
        print('{} x {}'.format(s, d[s]))


main()

Submission status: Accepted

Solution code:
d = {"AC":0,"WA":0,"TLE":0,"RE":0}
N = int(input())

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

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 k in dic:
  print('{} x {}'.format(k,dic[k]))

Submission status: Accepted

Solution code:
from collections import Counter
N=int(input())
S=[input() for i in range(N)]
a=[0]*4
for i in range(N):
    if S[i]=='AC':
        a[0]+=1
    elif S[i]=='WA':
        a[1]+=1
    elif S[i]=='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:
def main():
    N = int(input())
    d = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    for i in range(N):
        S = input()
        d[S] += 1
    print('AC x', d['AC'])
    print('WA x', d['WA'])
    print('TLE x', d['TLE'])
    print('RE x', d['RE'])
main()

Submission status: Accepted

Solution code:
N = int(input())

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

from collections import Counter
ans = Counter(S)
r = ["AC", "WA", "TLE", "RE"]
for i in r:
    print(i,"x",ans[i])
    # print(ans[i])

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for n 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:
import collections

def list_count(l):
    return collections.Counter(l)

n=int(input())
res=[]
for i in range(n):
    res.append(input())

res=list_count(res)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter


def f(x):
    print("{} x {}".format(x, c[x]))


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

c = Counter(s)

f("AC")
f("WA")
f("TLE")
f("RE")

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
C = Counter(S)
print('AC x ', end='')
print(C['AC'])
print('WA x ', end='')
print(C['WA'])
print('TLE x ', end='')
print(C['TLE'])
print('RE x ', end='')
print(C['RE'])

Submission status: Accepted

Solution code:
n=int(input())

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

for i in range(n):
    dic[input()]+=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())
AC=0
WA=0
TLE=0
RE=0
for _ in range(n):
    s=input()
    if s=="AC":
        AC=AC+1
    elif s=="WA":
        WA=WA+1
    elif s=="TLE":
        TLE=TLE+1
    elif s=="RE":
        RE=RE+1

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