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/python3
# -*- coding: utf-8 -*-
n = int(input())
key_dict = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(n):
    key = input()
    key_dict[key] += 1

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

Submission status: Accepted

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

d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for s in S:
    d[s] += 1
print('AC x', d['AC'])
print('WA x', d['WA'])
print('TLE x', d['TLE'])
print('RE x', d['RE'])

Submission status: Accepted

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

def solve(N: int, S: "List[str]"):
    d = defaultdict(int)
    for s in S:
        d[s]+=1
    print("AC x {}".format(d["AC"]))
    print("WA x {}".format(d["WA"]))
    print("TLE x {}".format(d["TLE"]))
    print("RE x {}".format(d["RE"]))
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

from collections import Counter
n = int(input())
a = [input() for _ in range(n)]
ans = Counter(a)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())

l = [0,0,0,0]

for i in range(N):

    t = input()

    if t == "AC":
        l[0] += 1
    elif t == "WA":
        l[1] += 1
    elif t == "TLE":
        l[2] += 1
    else:
        l[3] += 1

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

Submission status: Accepted

Solution code:
n=int(input())
a=b=c=d=0
for i in range(n):
    s=input()
    if s=="AC":
        a+=1
    elif s=="WA":
        b+=1
    elif s=="TLE":
        c+=1
    else:
        d+=1
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)

Submission status: Accepted

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

def main():
    n = int(input())
    s = []
    for _ in range(n):
        s.append(input())
    s = collections.Counter(s)
    print('AC x {}'.format(s['AC']))
    print('WA x {}'.format(s['WA']))
    print('TLE x {}'.format(s['TLE']))
    print('RE x {}'.format(s['RE']))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

for i 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 {}'.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())
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
    if a[i]=='WA':
        wa += 1
    if a[i]=='TLE':
        tle += 1
    if a[i]=='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:
from collections import Counter
N=int(input())
D=Counter()
A=[]
for i in range(N):
  A.append(input())
D=Counter(A)
if "AC" not in D:
  D["AC"]=0
if "WA" not in D:
  D["WA"]=0
if "TLE" not in D:
  D["TLE"]=0
if "RE" not in D:
  D["RE"]=0

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 = []
for i in range(N):
    S.append(input())

print("AC x ", S.count("AC"))
print("WA x ", S.count("WA"))
print("TLE x ", S.count("TLE"))
print("RE x ", S.count("RE"))

Submission status: Accepted

Solution code:
import collections
n = int(input())
s = [input() for _ in range(n)]
s = collections.Counter(s)
print("AC x " + str(s["AC"]))
print("WA x " + str(s["WA"]))
print("TLE x " + str(s["TLE"]))
print("RE x " + str(s["RE"]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = {'AC':0,'WA':0,'TLE':0,'RE':0}
    for n in range(N):
        S[str(input())] += 1
        
    tmp = ['AC','WA','TLE','RE']
    for t in tmp:
        print(t+' x '+str(S[t]))
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
results = [input() for _ in range(N)]
cntAC = 0
cntWA = 0
cntTLE = 0
cntRE = 0

for i in results:
    if i == "AC":
        cntAC += 1
    elif i == "WA":
        cntWA += 1
    elif i == "TLE":
        cntTLE += 1
    elif i == "RE":
        cntRE += 1

print("AC x {}".format(cntAC))
print("WA x {}".format(cntWA))
print("TLE x {}".format(cntTLE))
print("RE x {}".format(cntRE))

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
    stri = str(input())

    if stri == "AC":
        ac += 1
    elif stri == "WA":
        wa += 1
    elif stri == "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())
t = [0]*4
for i in range(N):
  s = input()
  if s == 'AC':
    t[0]+=1
  elif s == 'WA':
    t[1]+=1
  elif s == 'TLE':
    t[2]+=1
  else:
    t[3]+=1


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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

import collections
def main():
    N = int(input())
    s = [input() for i in range(N)]
    c = collections.Counter(s)
    print('AC x ' + str(c['AC']))
    print('WA x ' + str(c['WA']))
    print('TLE x ' + str(c['TLE']))
    print('RE x ' + str(c['RE']))

    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())

dic={}
for item in ["AC","WA","TLE","RE"]:
    dic[item]=0

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

for item in ["AC","WA","TLE","RE"]:
    print(item+" x "+str(dic[item]))

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=[0,0,0,0]
for i in range(n):
    now=str(input())
    if now=='AC':
        S[0]+=1
    elif now=='WA':
        S[1]+=1
    elif now=='TLE':
        S[2]+=1
    else:
        S[3]+=1
    
print('AC x {0}'.format(S[0]))
print('WA x {0}'.format(S[1]))
print('TLE x {0}'.format(S[2]))
print('RE x {0}'.format(S[3]))

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', 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 = []
for _ in range(N):
    S.append(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
#n,k = map(int,input().split())
#a = list(map(int,input().split()))
#mod = pow(10,9) + 7

ac=wa=tle=re=0

for i in range(n):
    a = input()
    if(a=='AC'):
        ac +=1
    elif(a=='WA'):
        wa += 1
    elif(a=='TLE'):
        tle +=1
    elif(a=='RE'):
        re+=1
print("AC x",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)

Submission status: Accepted

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

n = int(input())
d = defaultdict(int)
for _ 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())
D = [input() for j in range(N)]
a = D.count("AC")
w = D.count("WA")
t = D.count("TLE")
r = D.count("RE")
print("AC x "+str(a))
print("WA x "+str(w))
print("TLE x "+str(t))
print("RE x "+str(r))

Submission status: Accepted

Solution code:
from collections import Counter

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

c = Counter(s)

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

Submission status: Accepted

Solution code:
from collections import OrderedDict


def main():
    n = int(input())
    ans_dict = OrderedDict({
        'AC': 0,
        'WA': 0,
        'TLE': 0,
        'RE': 0,
    })
    for idx in range(n):
        s = input().strip('\n')
        ans_dict[s] += 1

    for k, v in ans_dict.items():
        print(f'{k} x {v}')


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
for i in range(N):
    ans[input().strip()] += 1

for i in ["AC", "WA", "TLE", "RE"]:
    print("{} x {}".format(i, ans[i]))

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
  S = str(input())
  ans_dict[S] = ans_dict.get(S,0) + 1

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

Submission status: Accepted

Solution code:
from collections import defaultdict as dd

n = int(input())
S = dd(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:
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate, product, combinations_with_replacement
import sys
import bisect
import string
import math
import time


def I(): return int(input())
def S(): return input()
def MI(): return map(int, input().split())
def MS(): return map(str, input().split())
def LI(): return [int(i) for i in input().split()]
def LI_(): return [int(i)-1 for i in input().split()]
def StoI(): return [ord(i)-97 for i in input()]
def ItoS(nn): return chr(nn+97)
def input(): return sys.stdin.readline().rstrip()
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 print_matrix(mat):
    for i in range(len(mat)):
        print(*['IINF' if v == IINF else "{:0=4}".format(v) for v in mat[i]])


yn = {False: 'No', True: 'Yes'}
YN = {False: 'NO', True: 'YES'}
MOD = 10**9+7
inf = float('inf')
IINF = 10**19
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
ts = time.time()
sys.setrecursionlimit(10**6)
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
show_flg = False
# show_flg = True


def main():
    N = I()
    a = ['AC', 'WA', 'TLE', 'RE']
    cnt = defaultdict(int)

    for i in range(N):
        s = S()
        cnt[s] += 1

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

main()

Submission status: Accepted

Solution code:
N=int(input())
cAC=0
cWA=0
cTLE=0
cRE=0
for i in range(N):
    X=input()
    if X=="AC":
        cAC+=1
    elif X=="WA":
        cWA+=1
    elif X=="TLE":
        cTLE+=1
    else:
        cRE+=1

print("AC x "+str(cAC))
print("WA x "+str(cWA))
print("TLE x "+str(cTLE))
print("RE x "+str(cRE))

Submission status: Accepted

Solution code:
# coding: utf-8
# hello worldと表示する
#float型を許すな
#numpyはpythonで
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil,pi,factorial
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def SI(): return input().rstrip()
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
n=I()
lis=[SI() for i in range(n)]
c=Counter(lis)
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:
from math import gcd, sqrt, pi, floor, ceil
from collections import defaultdict as d
from itertools import combinations as c
from string import ascii_lowercase as a

n = int(input())
dd = d(int)
for i in range(n):
	e = input()
	dd[e] += 1
print('AC x', dd['AC'])
print('WA x', dd['WA'])
print('TLE x', dd['TLE'])
print('RE x', dd['RE'])

Submission status: Accepted

Solution code:
n=int(input())
s=[input() for _ in range(n)]
c0=0
c1=0
c2=0
c3=0
for i in s:
  if i=="AC":
    c0+=1
  elif i=="WA":
    c1+=1
  elif i=="TLE":
    c2+=1
  elif i=="RE":
    c3+=1
print("AC"+" "+"x"+" "+str(c0))
print("WA"+" "+"x"+" "+str(c1))
print("TLE"+" "+"x"+" "+str(c2))
print("RE"+" "+"x"+" "+str(c3))

Submission status: Accepted

Solution code:
N= int(input())
S=[]
ac,tle,wa,re=0,0,0,0
for i in range(N):
    inp=input()
    if inp=="AC":
        ac+=1
    elif inp=="TLE":
        tle+=1
    elif inp=="WA":
        wa+=1
    elif inp=="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 sys, io, os, re
from bisect import bisect, bisect_left, bisect_right, insort, insort_left, insort_right
from pprint import pprint
from math import sin, cos, pi, radians, sqrt, floor, ceil
from copy import copy, deepcopy
from collections import deque
from fractions import gcd
from functools import reduce
from itertools import groupby
from heapq import heapify, heappush, heappop

# sys.setrecursionlimit(5000)

n1 = lambda: int(sys.stdin.readline().strip())
nn = lambda: list(map(int, sys.stdin.readline().strip().split()))
f1 = lambda: float(sys.stdin.readline().strip())
fn = lambda: list(map(float, sys.stdin.readline().strip().split()))
s1 = lambda: sys.stdin.readline().strip()
sn = lambda: list(sys.stdin.readline().strip().split())
nl = lambda n: [n1() for _ in range(n)]
fl = lambda n: [f1() for _ in range(n)]
sl = lambda n: [s1() for _ in range(n)]
nm = lambda n: [nn() for _ in range(n)]
fm = lambda n: [fn() for _ in range(n)]
sm = lambda n: [sn() for _ in range(n)]

def array1(n, d=0): return [d] * n
def array2(n, m, d=0): return [[d] * m for x in range(n)]
def array3(n, m, l, d=0): return [[[d] * l for y in xrange(m)] for x in xrange(n)]
def linc(A, d=1): return map(lambda x: x + d, A)
def ldec(A, d=1): return map(lambda x: x - d, A)

N = n1()
S = sl(N)

C = array1(4)

for s in S:
    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())

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
    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:
n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for _ in range(n):
    i = input()
    if i == 'AC':
        AC += 1
    elif i == 'WA':
        WA += 1
    elif i == 'TLE':
        TLE += 1
    else:
        RE += 1
print('AC x ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))

Submission status: Accepted

Solution code:
N=int(input())
a=0
b=0
c=0
d=0
for _ in range(N):
    S=input()
    if S=='AC':
        a+=1
    elif S=='WA':
        b+=1
    elif S=='TLE':
        c+=1
    else:
        d+=1
print('AC x '+str(a))
print('WA x '+str(b))
print('TLE x '+str(c))
print('RE x '+str(d))

Submission status: Accepted

Solution code:
def resolve():
    '''
    code here
    '''
    import collections
    N = int(input())
    S = [input() for _ in range(N)]
    dict1 = collections.Counter(S)

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

if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

for i in range(N):
    s = input()
    if s == "AC":
        ac += 1
    elif s == "WA":
        wa += 1
    elif s == "TLE":
        tle += 1
    elif s == "RE":
        re += 1

print("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,b,c,d=0,0,0,0
for i in range(N):
  s=input()
  if s=='AC': a+=1
  elif s=='WA': b+=1
  elif s=='TLE': c+=1
  elif s=='RE': d+=1
  pass
print('AC x {}'.format(a))
print('WA x {}'.format(b))
print('TLE x {}'.format(c))
print('RE x {}'.format(d))

Submission status: Accepted

Solution code:
def _run(n, ss):
    result = {}
    for s in ss:
        result.setdefault(s, []).append(1)
    for key in ["AC", "WA", "TLE", "RE"]:
        print("{} x {}".format(key, len(result.get(key, []))))


def _main():
    n = int(input())
    ss = [str(input()) for i in range(n)]

    _run(n, ss)


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

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

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

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

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

Submission status: Accepted

Solution code:
N = int(input())

ans = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(N):
    S = input()
    ans[S] += 1

for key, value in ans.items():
    print(key, "x", value)

Submission status: Accepted

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

for i in range(len(tmp)):
    print("{0} x {1}".format(tmp[i], count[i]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    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 {}".format(dict["AC"]))
    print("WA x {}".format(dict["WA"]))
    print("TLE x {}".format(dict["TLE"]))
    print("RE x {}".format(dict["RE"]))

resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0

N = k()
a = []
for i in range(N):
    x = input()
    a.append(x)
AC = 0
TLE = 0
WA = 0
RE = 0


y = []
for i in a:
    if i == "AC":
        AC += 1
    elif i == "WA":
        WA += 1
    elif i == "TLE":
        TLE += 1
    elif i == "RE":
        RE += 1

y.append(AC)
y.append(WA)
y.append(TLE)
y.append(RE)


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

for i,j in zip(z,y):
    print("{} x {}".format(i,j))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

for i in range(N):
  S = input()
  Sli[S] += 1
  
print("AC x "+str(Sli["AC"]))
print("WA x "+str(Sli["WA"]))
print("TLE x "+str(Sli["TLE"]))
print("RE x "+str(Sli["RE"]))

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline().rstrip('\n')
    

def calc(N, S):
    j = 'AC,WA,TLE,RE'.split(',')
    d = {key: 0 for key in j}
    for s in S:
        d[s] += 1
    return '\n'.join(["{0} x {1}".format(key, d[key]) for key in j])



N = int(input())
S = [input() for s in range(N)]
print(calc(N, S))

Submission status: Accepted

Solution code:
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from math import factorial, sqrt, ceil, gcd
from functools import lru_cache, reduce
from decimal import Decimal
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)

# UnionFind
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# ダイクストラ
def dijkstra_heap(s, edge, n):
    #始点sから各頂点への最短距離
    d = [10**20] * n
    used = [True] * n #True:未確定
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        #まだ使われてない頂点の中から最小の距離のものを探す
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d

# 素因数分解
def factorization(n):
    arr = []
    temp = n
    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

# 2数の最小公倍数
def lcm(x, y):
    return (x * y) // gcd(x, y)

# リストの要素の最小公倍数
def lcm_list(numbers):
    return reduce(lcm, numbers, 1)

# リストの要素の最大公約数
def gcd_list(numbers):
    return reduce(gcd, numbers)

# 素数判定
def is_prime(n):
    if n <= 1:
        return False
    p = 2
    while True:
        if p ** 2 > n:
            break
        if n % p == 0:
            return False
        p += 1
    return True


# limit以下の素数を列挙
def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P

# 同じものを含む順列
def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        # set（集合）型で重複を削除、ソート
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret


# ここから書き始める
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
s = ["" for i in range(n)]
for i in range(n):
    s[i] = 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 %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())
n_ac = 0
n_wa = 0
n_tle = 0
n_re = 0
for i in range(n):
    temp = input()
    if temp == "AC":
        n_ac += 1
    elif temp == "WA":
        n_wa += 1
    elif temp == "TLE":
        n_tle += 1
    else :
        n_re += 1
print("AC x "+str(n_ac))
print("WA x "+str(n_wa))
print("TLE x "+str(n_tle))
print("RE x "+str(n_re))

Submission status: Accepted

Solution code:
N= int(input())
res = {}
res['AC'] = 0
res['WA'] = 0
res['TLE'] = 0
res['RE'] = 0
for i in range(N):
    S = input()
    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:
from collections import defaultdict
N = int(input())
d = defaultdict(int)
for _ in range(N):
    s = str(input())
    d[s] += 1
print('AC x {}'.format(d['AC']))
print('WA x {}'.format(d['WA']))
print('TLE x {}'.format(d['TLE']))
print('RE x {}'.format(d['RE']))

Submission status: Accepted

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

from collections import Counter
c=Counter(s)

for i in a:
    print(i,"x",c[i])

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