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

N = int(input())
stringList = [input() for i in range(N)]

c0 = 0
c1 = 0
c2 = 0
c3 = 0


for j in range(N):
    if stringList[j] == 'AC':
        c0 = c0 + 1
    if stringList[j] == 'WA':
        c1 = c1 + 1
    if stringList[j] == 'TLE':
        c2 = c2 + 1
    if stringList[j] == 'RE':
        c3 = 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 = []

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

ac = str(S.count('AC'))
wa = str(S.count('WA'))
tle = str(S.count('TLE'))
re = str(S.count('RE'))


ans = 'AC x'+' '+ ac + "\n"+'WA x'+' '+ wa + "\n"+'TLE x' +' '+ tle +"\n" + 'RE x'+' '+re

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
list = [input() for i in range(N)]

c_0 = 0
c_1 = 0
c_2 = 0
c_3 = 0

for string in list:
  if string == 'AC':
    c_0 += 1
  elif string == 'WA':
    c_1 += 1
  elif string == 'TLE':
    c_2 += 1
  elif string == 'RE':
    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())
X = []
for i in range(N):
    X.append(input())

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

for s in X:
    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())
word_dict = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for _ in range(n):
  word = str(input())
  if word in word_dict:
    word_dict[word] += 1
  else:
    word_dict[word] = 1
for k, v in word_dict.items():
  print(k, 'x', v)

Submission status: Accepted

Solution code:
n=int(input())
c0,c1,c2,c3=0,0,0,0

for i in range (n):
    s=input()
    if(s=='AC'):
        c0=c0+1
    if (s=='WA'):
        c1+=1
    if(s=='TLE'):
        c2+=1
    if(s=='RE'):
        c3+=1
print("AC x ",c0)
print("\nWA x ",c1)
print("\nTLE x ",c2)
print("\nRE x ",c3)

Submission status: Accepted

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce


def input(): return sys.stdin.readline().strip()


def INT(): return int(input())


def MAP(): return map(int, input().split())


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


def ZIP(n): return zip(*(MAP() for _ in range(n)))


sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


def main():
    N = INT()
    judge = {"AC":0, "WA" : 0, "TLE" : 0, "RE" : 0}
    for _ in range(N):
        s = input()
        judge[s] += 1
    
    for x, y in judge.items():
        print(x, "x", y)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ss = [input() for i in range(N)]

results={'AC':0,'WA':0,'TLE':0,'RE':0}
for s in ss:
    results[s]+=1

for result,count in results.items():
    print(result,'x',count)

Submission status: Accepted

Solution code:
a = int(input())
list1 = []
dict1 = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0,}
for x in range(a):
    b = input()
    list1.append(b)

for x in list1:
    dict1[x] += 1

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

Submission status: Accepted

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

for i in range(n):
  s = input()
  d[s] += 1
for s,k in d.items():
  print(s, "x", k)

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
c = Counter()
for _ in range(n):
    c.update([input()])
for k in ["AC","WA","TLE","RE"]:
    print(f"{k} x {c[k]}")

Submission status: Accepted

Solution code:
n = int(input())

words = ['AC', 'WA', 'TLE', 'RE']
ls = [0]*4

for i in range(n) :
    s = input()
    if s in words :
        ls[words.index(s)] += 1

for j in range(4) :
    print(words[j]+' x '+str(ls[j]))

Submission status: Accepted

Solution code:
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for _ in range(n):
  s = input().rstrip()
  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:
AC = 0
WA = 0 
TLE = 0
RE = 0

n = int(input())
for i in range(n):
  t = str(input()).upper()
  if t == "AC":
    AC += 1
  
  if t == "WA":
    WA += 1
  
  if t == "TLE":
    TLE += 1
  
  if t == "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())
s = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0
for ss in s:
    if ss == 'AC':
        ac+=1
    elif ss == 'WA':
        wa+=1
    elif ss == 'TLE':
        tle+=1
    elif ss == '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())
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())
a1 = []
for i in range(N):
  a1.append(input())

a2 = ["AC", "WA", "TLE", "RE"]
for i in a2:
  print(i + " x " + str(a1.count(i)))

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
  elif(S=="RE"):
    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:

ans = {"AC": 0, "WA": 0, "TLE": 0, "RE":0}
N = int(input())
for i in range(N):
  inpt = input()
  if(inpt == "AC"):
    ans["AC"] += 1
  elif(inpt == "WA"):
    ans["WA"] += 1
  elif(inpt == "TLE"):
    ans["TLE"] += 1
  else:
    ans["RE"] += 1
for key, value in ans.items():
  print("{0} x {1}".format(key, value))

Submission status: Accepted

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

ANS = {"AC":0, "WA":0, "TLE":0, "RE":0}
for i in S:
    ANS[i] += 1

for key, value in ANS.items():
    print("{0} x {1}".format(key, value))

Submission status: Accepted

Solution code:
N = int(input())
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0


for i in range(N):
    x = input()
    if x == "AC":
        count_AC += 1
    elif x == "WA":
        count_WA += 1
    elif x == "TLE":
        count_TLE += 1
    elif x ==  "RE":
        count_RE += 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:
d = {"AC":0,"WA":0,"TLE":0,"RE":0}
for _ in range(int(input())):
    s = input()
    d[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:
n = int(input())
x = []
for i in range(n):
  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=[]

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


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

for i in range(len(S)):
    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("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

Submission status: Accepted

Solution code:
numtcs = int(input())
judgement = []
for i in range(numtcs):
	judgement.append(input())

numac = judgement.count("AC")
print(f'AC x {numac}')
numwa = judgement.count("WA")
print(f'WA x {numwa}')
numtle = judgement.count("TLE")
print(f'TLE x {numtle}')
numre = judgement.count("RE")
print(f'RE x {numre}')

Submission status: Accepted

Solution code:
n=int(input())
lis=['AC', 'WA', 'TLE', 'RE']
ans=[0,0,0,0]
for _ in range(n):
    s=input()
    ans[lis.index(s)]+=1

for i in range(4):
    print(lis[i]+' x '+str(ans[i]))

Submission status: Accepted

Solution code:
N=int(input())
LI=[]
for i in range(N):
    tt=input()
    LI.append(tt)

moto=['AC','WA','TLE','RE']
suum=[]
for i in moto:
    moji=LI.count(i)
    suum.append(moji)

for i in range(4):
    print('{} x {}'.format(moto[i],suum[i]))

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]
counter = Counter(s)
output = ['AC','WA','TLE','RE']

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

Submission status: Accepted

Solution code:
d = {}
for _n in range(int(input())):
  s = input()
  d[s] = d.get(s,0) + 1
print("AC x", d.get("AC", 0))
print("WA x", d.get("WA", 0))
print("TLE x", d.get("TLE",0))
print("RE x", d.get("RE", 0))

Submission status: Accepted

Solution code:
a=int(input())
p=[0 for i  in range(4)]
for i  in range(a):
    t=input()
    if  t=="AC":
        p[0]+=1
    elif t=="WA":
        p[1]+=1
    elif t=="TLE":
        p[2]+=1
    else:
        p[3]+=1

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

Submission status: Accepted

Solution code:
N = int(input())
testcase = [input()for i in range (N)]

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

for t in  testcase:
    if t == "AC":
        AC += 1
    elif t == "WA":
        WA += 1
    elif t == "TLE":
        TLE += 1
    elif t == "RE":
        RE += 1
    else:
        continue
        
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())
arr = [input() for i in range(N)]

for t in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{t} x {arr.count(t)}')

Submission status: Accepted

Solution code:
N = int(input())

count = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(N):
	s = input()
	count[s] += 1
	
for key, item in count.items():
	print('{} x {}'.format(key, item))

Submission status: Accepted

Solution code:
N=int(input())

r=[input() for i in range(N)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  A = str(input())
  if A == 'AC':
    AC += 1
  elif A == 'WA':
    WA += 1
  elif A == 'TLE':
    TLE += 1
  elif A == 'RE':
    RE += 1

print(f'''AC x {AC}''')
print(f'''WA x {WA}''')
print(f'''TLE x {TLE}''')
print(f'''RE x {RE}''')

Submission status: Accepted

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

ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
  data = input().rstrip()
  if data == 'AC':
    ac += 1
  elif data == 'WA':
    wa += 1
  elif data == 'TLE':
    tle += 1
  elif data == '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())
s = [input() for i in range(n)]
c = [0] * 4

for i in range(n):
    if s[i] == "AC":
        c[0] += 1
        
    elif s[i] == "WA":
        c[1] += 1
        
    elif s[i] == "TLE":
        c[2] += 1
        
    elif s[i] == "RE":
        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:
ac=0;wa=0;re=0;tle=0
for _ in range(int(input())):
    n=input()
    if n=='AC': ac+=1
    elif n=='WA': wa+=1
    elif n=='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 collections

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

AC_count = S.count("AC")
WA_count = S.count("WA")
TLE_count = S.count("TLE")
RE_count = S.count("RE")

print(f"AC x {AC_count}")
print(f"WA x {WA_count}")
print(f"TLE x {TLE_count}")
print(f"RE x {RE_count}")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
N = int(input())
cnt = defaultdict(int)
for i in range(N):
    S = input()
    cnt[S] += 1
for k in ["AC", "WA", "TLE", "RE"]:
    print("{} x {}".format(k, cnt[k]))

Submission status: Accepted

Solution code:
N = int(input())
ans = [0 for i in range(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:
#!/usr/bin/env python3

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

for a in S:
    print(a + " x " + str(S[a]))

Submission status: Accepted

Solution code:
from collections import defaultdict

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(1,N+1):
  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:
num = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(1, num + 1):
    judge = str(input())
    if judge == "AC":
        ac += 1
    elif judge == "WA":
        wa += 1
    elif judge == "TLE":
        tle += 1
    elif judge == "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())
C = [0]*4
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
    elif S == 'RE':
        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:
x = int(input())
d = dict()
d["AC"] = 0
d["WA"] = 0
d["TLE"] = 0
d["RE"] = 0
for i in range(x):
  s = input()
  d[s] += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())


a=0
b=0
c=0
d=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 
    
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())
a = [input() for i in range(n)]

for v in ['AC', 'WA', 'TLE', 'RE']:
  print(f'{v} x {a.count(v)}')

Submission status: Accepted

Solution code:
n = int(input())
a = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0
for s in a:
  if s=='AC':
    ac+=1
  if s=='WA':
    wa+=1
  if s=='TLE':
    tle+=1
  if s=='RE':
    re+=1
print(f'AC x {ac}')
print(f'WA x {wa}')
print(f'TLE x {tle}')
print(f'RE x {re}')

Submission status: Accepted

Solution code:
num=int(input())
count_AC=0
count_WA=0
count_TLE=0
count_RE=0

def judge(x):
        global count_AC
        global count_WA
        global count_TLE
        global count_RE
        if x=='AC':
            count_AC+=1
        if x=='WA':
            count_WA+=1
        if x=='TLE':
            count_TLE+=1
        if x=='RE':
            count_RE+=1

for i in range(num):
        judge(input())

print('AC x',str(count_AC),'\nWA x',str(count_WA),'\nTLE x',str(count_TLE),'\nRE x',str(count_RE))

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
    s = input()
    answers[s] += 1


for i in answers:
    print(i + " x " + str(answers[i]))

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest
from collections import Counter

def resolve():
    # s = input()
    n = int(input())
    # a, b = map(int, input().split())
    # l = [list(map(int, input().split())) for _ in range(n)]
    s = Counter([input() for _ in range(n)])

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

    for ac in ans:
        print(ac + ' x ' + str(s[ac]))




class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """6
AC
TLE
AC
AC
WA
TLE"""
        output = """AC x 3
WA x 1
TLE x 2
RE x 0"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC"""
        output = """AC x 10
WA x 0
TLE x 0
RE x 0"""
        self.assertIO(input, output)


if __name__ == "__main__":
    # unittest.main()
    resolve()

Submission status: Accepted

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

for _ in range(N):
    x = input()
    if x == 'AC':
        ac += 1
    elif x == 'WA':
        wa += 1
    elif x == 'TLE':
        tle += 1
    else:
        re += 1

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

Submission status: Accepted

Solution code:
N=int(input())

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


for i in range(N):
	word = input()
	if word =="AC":
		AC+=1
	if word =="WA":
		WA+=1
	if word =="TLE":
		TLE+=1
	if word =="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:
num = int(input())
word = {"AC":0, "WA":0, "TLE":0, "RE":0}
 
for i in range(num):
    judge = input()
    if judge in word:
        word[str(judge)] += 1
    else:
        pass
        
        
print("AC x " + str(word["AC"]))
print("WA x " + str(word["WA"]))
print("TLE x " + str(word["TLE"]))
print("RE x " + str(word["RE"]))

Submission status: Accepted

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

v=["AC", "WA", "TLE", "RE"]
for i in v:
    print(f"{i} x {s_list.count(i)}")

Submission status: Accepted

Solution code:
N_num = int(input())

N = []

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

AC_num = 0
WA_num = 0
TLE_num = 0
RE_num = 0

for i in range(N_num):
    #print(i+1)
    
    if 'AC' == N[i]:
        AC_num += 1
        #print(AC_num)
    
    elif 'WA' == N[i]:
        WA_num += 1
        #print(WA_num)

    elif 'TLE' == N[i]:
        TLE_num += 1
        #print(TLE_num)
    
    elif 'RE' == N[i]:
        RE_num += 1
        #print(RE_num)


print('AC x {}'.format(AC_num))
print('WA x {}'.format(WA_num))
print('TLE x {}'.format(TLE_num))
print('RE x {}'.format(RE_num))

Submission status: Accepted

Solution code:
import sys 

def A():
  n = int(sys.stdin.readline().rstrip())
  charge = (n+999)//1000 * 1000 - n
  print(charge)
  pass

from collections import Counter
def B():
  n, *s = sys.stdin.read().split() 
  c = Counter(s)
  for v in 'AC, WA, TLE, RE'.split(', '):
    print(f'{v} x {c[v]}')
  pass


def C():
  pass


def D():
  pass


def E():
  pass


def F():
  pass

if __name__ == "__main__":
  # A() 
  B()
  C()
  D()
  E()
  F()

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
ct = Counter(input() for _ in range(N))
for s in ('AC', 'WA', 'TLE', 'RE'):
    print(s, 'x', ct[s])

Submission status: Accepted

Solution code:
N = int(input())
array = []
for _ in range(N):
  array.append(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for test in array:
  if 'AC' == test:
    AC += 1
  elif 'WA' == test:
    WA += 1
  elif 'TLE' == test:
    TLE += 1
  elif 'RE' == test:
    RE += 1
print(f'AC x {AC}')
print(f'WA x {WA}')
print(f'TLE x {TLE}')
print(f'RE x {RE}')

Submission status: Accepted

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

while N >= 1:
    Sn = input()
    if Sn == 'AC':
        AC.append(1)
    if Sn == 'WA':
        WA.append(1)
    if Sn == 'TLE':
        TLE.append(1)
    if Sn == 'RE':
        RE.append(1)
    N = N - 1
    
print('AC x ' + str(sum(AC)))
print('WA x ' + str(sum(WA)))
print('TLE x ' + str(sum(TLE)))
print('RE x ' + str(sum(RE)))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for i in range(N)]
judge_kind = ['AC', 'WA', 'TLE', 'RE']
C = [0, 0, 0, 0]
for i in range(N):
    if S[i] == 'AC':
        C[0] += 1
    elif S[i] == 'WA':
        C[1] += 1
    elif S[i] == 'TLE':
        C[2] += 1
    else:
        C[3] += 1
for i in range(4):
    print('{} x  {}'.format(judge_kind[i], C[i]))

Submission status: Accepted

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

returns = []
ans = [0,0,0,0]

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

for j in range(N):
    if returns[j] == 'AC':
        ans[0] += 1
        continue
    if returns[j] == 'WA':
        ans[1] += 1
        continue
    if returns[j] == 'TLE':
        ans[2] += 1
        continue
    if returns[j] == 'RE':
        ans[3] += 1
        continue

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:
import sys
import collections


try:
    sys.stdin = open(sys.path[0] + '/input.txt', 'r')
    sys.stdout = open(sys.path[0] + '/output.txt', 'w')
except FileNotFoundError:
    pass


hmap = collections.defaultdict(int)

for i in range(int(input())):
    s = input()
    hmap[s] += 1


for term in ('AC', 'WA', 'TLE', 'RE'):
    print('{} x {}'.format(term, hmap[term]))

Submission status: Accepted

Solution code:
a = int(input())
hantei = []
for n in range(a):
    hantei.append(input())
print('AC x {}'.format(hantei.count('AC')))
print('WA x {}'.format(hantei.count('WA')))
print('TLE x {}'.format(hantei.count('TLE')))
print('RE x {}'.format(hantei.count('RE')))

Submission status: Accepted

Solution code:
n = int(input())

s = []
for _ in range(n):
  s1 = input()
  s.append(s1)

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

N = int(input())
d = defaultdict(lambda: 0)
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']))

Submission status: Accepted

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

for i in range(1,N+1):
  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())
AC = 0
WA = 0
TLE = 0
RE = 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
ans = "AC x " + str(AC) + "\n"
ans = ans + "WA x " + str(WA) + "\n"
ans = ans + "TLE x " + str(TLE) + "\n"
ans = ans + "RE x " + str(RE)
print(ans)

Submission status: Accepted

Solution code:
num = int(input())

list = []
dic = {}
for i in range(num):
    k = input()
    dic[k] = dic.get(k,0) +1
for i in ["AC","WA","TLE","RE"]:
    if i in dic.keys():
        print(i,"x",dic[i])
    else:
        print(i,"x",0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time,random,resource

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
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 pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)


def main():
    n = I()
    a = [S() for _ in range(n)]

    c = collections.Counter(a)
    k = ['AC', 'WA', 'TLE', 'RE']
    rr = []
    for s in k:
        rr.append(f"{s} x {c[s]}")

    return JA(rr, "\n")


print(main())

Submission status: Accepted

Solution code:
#! python3
# coding:utf-8

n = int(input())

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

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
    else:
        c3+=1

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

Submission status: Accepted

Solution code:
from collections import Counter

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

counter = Counter(s)

for x in ['AC', 'WA', 'TLE', 'RE']:
    n = counter[x]
    print("{} x {}".format(x,n))

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:
dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
N = int(input())
for i in range(N):
    S = input()
    dic[S] += 1

for j in dic:
    print(j + ' x ' + str(dic[j]))

Submission status: Accepted

Solution code:
N = int(input())
A = 0
W = 0
T = 0
R = 0
for i in range(1, N+1):
  s = str(input())
  if s == "AC":
    A = A + 1
  elif s == "WA":
    W = W + 1
  elif s == "TLE":
    T = T + 1
  elif s == "RE":
    R = 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:
k = {"AC":0, "WA":0, "TLE":0, "RE":0}

n = int(input())

for i in range(0, n):
    x = input()
    k[x] += 1

for i in k:
    print(i + " x " + str(k[i]))

Submission status: Accepted

Solution code:
N = int(input())

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
col = ['AC','WA','TLE','RE']
dic ={i:0 for i in col }

for i in range(n):
  s =input()
  dic[s] +=1
for i in col:
  print(f'{i} x {dic[i]}')

Submission status: Accepted

Solution code:
import collections

n = int(input())
c = collections.Counter([input() for i in range(n)])
print("AC x", c["AC"])
print("WA x", c["WA"])
print("TLE x", c["TLE"])
print("RE x", c["RE"])