Problem:


Score : 200 points

Problem Statement

Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.

The problem has N test cases.

For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively.

See the Output section for the output format.

Constraints

1 \leq N \leq 10^5

S_i is AC, WA, TLE, or RE.

Input

Input is given from Standard Input in the following format:

N
S_1
\vdots
S_N

Output

Let C_0, C_1, C_2, and C_3 be the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively. Print the following:

AC x C_0
WA x C_1
TLE x C_2
RE x C_3

Sample Input 1

6
AC
TLE
AC
AC
WA
TLE

Sample Output 1

AC x 3
WA x 1
TLE x 2
RE x 0

We have 3, 1, 2, and 0 test case(s) for which the verdict is AC, WA, TLE, and RE, respectively.

Sample Input 2

10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Sample Output 2

AC x 10
WA x 0
TLE x 0
RE x 0



Sample input:
6
AC
TLE
AC
AC
WA
TLE


Sample output:
AC x 3
WA x 1
TLE x 2
RE x 0

Submission status: Accepted

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

sc=Counter(s)

for a in ["AC", "WA", "TLE", "RE"]:
    print(a, "x", sc[a])

Submission status: Accepted

Solution code:
from collections import Counter
import sys
import math
n=int(input())
l=[]
a=['AC','WA','TLE','RE']
for i in range(n):
    ele=input()
    l.append(ele)   
c=Counter(l)
for r in a:
    print(r,"x",c[r])

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for i in range(n)]
ac_count,wa_count,tle_count,re_count = 0, 0, 0, 0
for i in s:
    if i == 'AC':
        ac_count += 1
    elif i == 'WA':
        wa_count += 1
    elif i == 'TLE':
        tle_count += 1
    elif i == 'RE':
        re_count += 1
    else:
        continue

print('AC x ' + str(ac_count))
print('WA x ' + str(wa_count))
print('TLE x ' + str(tle_count))
print('RE x ' + str(re_count))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for i in range(N)]
Result = ['AC', 'WA', 'TLE', 'RE']

for i in Result:
    print(i, 'x', S.count(i))

Submission status: Accepted

Solution code:
N = int(input())
S = list(input() for i in range(N))
Result = ['AC', 'WA', 'TLE', 'RE']

for i in Result:
    print(i, 'x', S.count(i))

Submission status: Accepted

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

for j in judge:
    print(f"{j} x {judge[j]} ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

for key, value in judge.items():
  print(key, 'x', value)

Submission status: Accepted

Solution code:
n = int(input())
d = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(n):
    d[input()] += 1
for k, v in d.items():
    print(k," x ", str(v))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)]
lis = ['AC','WA','TLE','RE']
for l in lis:
  print('{} x {}'.format(l,S.count(l)))

Submission status: Accepted

Solution code:
N=int(input())
 
a=0
w=0
t=0
r=0
 
for i in range(N):
  s=input()
  if s=="AC":
    a+=1
  elif s=="WA":
    w+=1
  elif s=="TLE":
    t+=1
  else:
    r+=1

print("AC x",a)
print("WA x",w)
print("TLE x",t)
print("RE x",r)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
xs = []
judge = ["AC","WA","TLE","RE"]
jd = {"AC":0,"WA":1,"TLE":2,"RE":3}
n = int(input())
for i in range(n):
    xs.append(input().rstrip())
xcount = [0 for i in range(4)]
for x in xs:
    xcount[jd[x]] += 1
for i in range(4):
    print(judge[i] + " x " + str(xcount[i]) )

Submission status: Accepted

Solution code:

def q2():
    N = int(input())
    data = {}
    judges = ['AC', 'WA', 'TLE', 'RE']
    for j in judges:
        data[j] = 0

    for i in range(N):
        j = input()
        data[j] += 1

    for j in judges:
        print(f'{j} x {data[j]}')


q2()

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
list_s = []
for i in range(N):
    S = input()
    list_s.append(S)

D = Counter(list_s)

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:
#!/usr/bin/env python3
n = int(input())
cnt = [0] * 4
res = ["AC", "WA", "TLE", "RE"]
for i in range(n):
    cnt[res.index(input())] += 1
for i in range(4):
    print(res[i], "x", cnt[i])

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())

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


print(f'AC x {cnt["AC"]}\nWA x {cnt["WA"]}\nTLE x {cnt["TLE"]}\nRE x {cnt["RE"]}')

Submission status: Accepted

Solution code:
a = int(input())
ar = [0,0,0,0]
for i in range(a):
    l = input()
    if l == "AC":
        ar[0] += 1
    if l == "WA":
        ar[1] += 1
    if l == "TLE":
        ar[2] += 1
    if l == "RE":
        ar[3] += 1
print("AC x " + str(ar[0]))
print("WA x " + str(ar[1]))
print("TLE x " + str(ar[2]))
print("RE x " + str(ar[3]))

Submission status: Accepted

Solution code:
k = ['AC','WA','TLE','RE']
n=int(input())
ans = {}
for _ in range(n):
  r = input()
  ans[r]=ans.get(r,0)+1
for r in k:
  print(r,'x',ans.get(r,0))

Submission status: Accepted

Solution code:
li = ["AC", "WA", "TLE", "RE"]
from collections import defaultdict
d = defaultdict(int)
N = int(input())
for i in range(N):
  s = input()
  d[s] += 1
for an in li:
  print(f"{an} x {d[an]}")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
from collections import Counter
N=int(input())
S=[input() for i in range(N)]
s=Counter(S)
judge=["AC","WA","TLE","RE"]
for j in judge:
    print("{0} x {1}".format(j,s[j]))

Submission status: Accepted

Solution code:
n = int(input())
key = ["AC", "WA", "TLE", "RE"]
value = [0,0,0,0]
for _ in range(n):
    tmp = str(input())
    if tmp in key:
        index = key.index(tmp)
        value[index]+=1
for i in range(4):
    print("{0} x {1}".format(key[i],value[i]))

Submission status: Accepted

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

Submission status: Accepted

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

def main():
    N = int(input())
    S = [input().rstrip() for _ in range(N)]
    c = collections.Counter(S)
    for tc in ["AC", "WA", "TLE", "RE"]:
        if tc in c:
            print("{} x {}".format(tc, c[tc]))
        else:
            print("{} x 0".format(tc))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict

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

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

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

d = dict(AC=0, WA=0, TLE=0, RE=0)
for _ in range(N):
    S = input()
    d[S] += 1

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

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
ac = 0
wa = 0
tle = 0
re = 0
for _ in range(N):
    t = S()
    if t == 'AC':
        ac += 1
    elif t == 'WA':
        wa += 1
    elif t == 'TLE':
        tle += 1
    elif t == '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:
#[int(i) for i in input().split()]
import collections
n = int(input())
dic = collections.defaultdict(int)
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:
def int_input():
    i = list(map(int, input().split()))
    if len(i) == 1:
        return i[0]
    return i


n = int_input()

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

print('AC x', c[0])
print('WA x', c[1])
print('TLE x', c[2])
print('RE x', c[3])

Submission status: Accepted

Solution code:
from collections import Counter
n,*lst = open(0).read().split()
c = Counter(lst)
for s in ['AC','WA','TLE','RE']:
    print(f"{s} x {c[s]}")

Submission status: Accepted

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

Submission status: Accepted

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


def main():
    from collections import Counter

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
dic = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(int(input())):
    dic[input()] += 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:
n=int(input())
s=list(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())
an=[["AC",0],["WA",0],["TLE",0],["RE",0]]
for i in range(n):
  s=input()
  for j in an:
    if j[0]==s:
      j[1]+=1;break
      
for j in an:
  print(j[0],"x",j[1])

Submission status: Accepted

Solution code:
n = int(input())
j = {"AC": 0,"WA": 1,"TLE": 2, "RE": 3}
c = [0,0,0,0]
for i in range(n):
    c[j[input()]] += 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())
C_0 = C_1 = C_2 = C_3 = 0
for i in range(N):
  c = input()
  if c == 'AC':
    C_0 += 1
  elif c == 'WA':
    C_1 += 1
  elif c == 'TLE':
    C_2 += 1
  else:
    C_3 += 1

print('AC x ' + str(C_0))
print('WA x ' + str(C_1))
print('TLE x ' + str(C_2))
print('RE x ' + str(C_3))

Submission status: Accepted

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

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

a = S.count('AC')
b = S.count('WA')
c = S.count('TLE')
d = S.count('RE')

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

Submission status: Accepted

Solution code:
thisDict={
  "AC":0,
  "WA":0,
  "TLE":0,
  "RE":0
}
tests=int(input())
for test in range(tests):
  thisDict[input()]+=1
for word, value in thisDict.items():
  print(word + " x "+ str(value))

Submission status: Accepted

Solution code:
kind = [0, 0, 0, 0]
N = int(input())
for _ in range(N):
    line = input()
    if line == 'AC':
        kind[0] += 1
    elif line == 'WA':
        kind[1] += 1
    elif line == 'TLE':
        kind[2] += 1
    elif line == 'RE':
        kind[3] += 1

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

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 == "RE":
        re += 1
    else:
        tle += 1
print("AC x", ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import sys
# input = sys.stdin.buffer.readline

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

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

    for e in s:
        if e == "AC":
            ac += 1
        elif e == "WA":
            wa += 1
        elif e == "TLE":
            tle += 1
        else:
            re += 1

    # for i in range(len(s)):
    #     if s[i].strip().decode() == "AC":
    #         ac += 1
    #     elif s[i].strip().decode() == "WA":
    #         wa += 1
    #     elif s[i].strip().decode() == "TLE":
    #         tle += 1
    #     else:
    #         re += 1

    print("AC x {}".format(str(ac)))
    print("WA x {}".format(str(wa)))
    print("TLE x {}".format(str(tle)))
    print("RE x {}".format(str(re)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

cnt_list = []

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

C0 = 0
C1 = 0
C2 = 0
C3 = 0


for s in cnt_list:
    if s == "AC":
        C0 += 1
    elif s == "WA":
        C1 += 1
    elif s == "TLE":
        C2 += 1
    elif s == "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 = [input() for i in range(n)]
for i in ['AC','WA','TLE','RE']:
    print(i+" x "+str(s.count(i)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# coding: utf-8
import math
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 = [input() for i in range(n)]
print("AC x "+str(s.count("AC")))
print("WA x "+str(s.count("WA")))
print("TLE x "+str(s.count("TLE")))
print("RE x "+str(s.count("RE")))

Submission status: Accepted

Solution code:
l=[]
for _ in range(int(input())):
    s = input()
    l.append(s)
ac,wa,tle,reg=l.count('AC'),l.count('WA'),l.count('TLE'),l.count('RE')
print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(reg))

Submission status: Accepted

Solution code:
ac=0
wa=0
tle=0
re=0
for _ in range(int(input())):
  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:
x=[0,0,0,0]
y=['AC','WA','TLE','RE']
y1=' x '
#y=['AC x ','WA x ','TLE x ','RE x ']

n=int(input())

for i in range(n):
    a=input()  
    for i in range(4):
        if a==y[i]:
            x[i]=x[i]+1
    
for i in range(4):
    x[i]=str(x[i])
    y[i]=y[i]+y1+x[i]
    print(y[i])

Submission status: Accepted

Solution code:
S={'AC':0,'WA':0,'TLE':0,'RE':0}

for i in range(int(input())):
  S[input()]+=1
for k,v in S.items():
  print(k,'x',v)

Submission status: Accepted

Solution code:
x=[0,0,0,0]
y=['AC x ','WA x ','TLE x ','RE x ']

n=int(input())

for i in range(n):
    a=input()  
    if a=='AC':
        x[0]=x[0]+1
    elif a=='WA':
        x[1]=x[1]+1
    elif a=='TLE':
        x[2]=x[2]+1
    else:
        x[3]=x[3]+1
    
for i in range(4):
    x[i]=str(x[i])
    y[i]=y[i]+x[i]
    print(y[i])

Submission status: Accepted

Solution code:
n = int(input())
cnt = [0] * 4
for _ in range(n):
    tmp = input()
    if tmp == 'AC':
        cnt[0] += 1
    elif tmp == 'WA':
        cnt[1] += 1
    elif tmp == 'TLE':
        cnt[2] += 1
    else:
        cnt[3] += 1

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

for i in range(4):
    print(j_txt[i] + ' x ' + str(cnt[i]))

Submission status: Accepted

Solution code:
x1=0
x2=0
x3=0
x4=0

y1='AC x '
y2='WA x '
y3='TLE x '
y4='RE x '

n=int(input())

for i in range(n):
  a=input()  
  if a=='AC':
    x1=x1+1
  if a=='WA':
    x2=x2+1
  if a=='TLE':
    x3=x3+1
  if a=='RE':
    x4=x4+1
    
x1=str(x1)
x2=str(x2)
x3=str(x3)
x4=str(x4)

y1=y1+x1
y2=y2+x2
y3=y3+x3
y4=y4+x4

print(y1)
print(y2)
print(y3)
print(y4)

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

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())
cnt={}
cnt['AC']=0
cnt['WA']=0
cnt['TLE']=0
cnt['RE']=0

for i in range(N):
  s=input()
  cnt[s]+=1
  
print('AC x '+str(cnt['AC']))
print('WA x '+str(cnt['WA']))
print('TLE x '+str(cnt['TLE']))
print('RE x '+str(cnt['RE']))

Submission status: Accepted

Solution code:
from collections import defaultdict

N = int(input())
d = defaultdict(int)
for i in range(N):
    d[input()] += 1
[print(result + ' x ' + str(d[result])) for result in ['AC', 'WA', 'TLE', 'RE']]

Submission status: Accepted

Solution code:
from collections import defaultdict

N = int(input())
d = defaultdict(int)
for i in range(N):
    d[input()] += 1
results = ['AC', 'WA', 'TLE', 'RE']
for result in results:
    print(result + ' x ' + str(d[result]))

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
input = sys.stdin.readline
inp = lambda: input().rstrip('\n')
n = int(input())
freq = defaultdict(int)
for _ in range(n):
    s = inp()
    freq[s] += 1
print('AC', 'x', freq['AC'])
print('WA', 'x', freq['WA'])
print('TLE', 'x', freq['TLE'])
print('RE', 'x', freq['RE'])

Submission status: Accepted

Solution code:
#!/usr/bin python3
# -*- coding: utf-8 -*-

def main():
    N = int(input())
    l = ['AC', 'WA', 'TLE', 'RE']
    dic = {key:0 for key in l}
    for _ in range(N):
        dic[input()] += 1
    for key in l:
        print(key + ' x ' + str(dic[key]))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

n = int(input())
ans = [0] * 4

for i in range(n):
    s = input().rstrip()
    if s == 'AC': ans[0] += 1
    if s == 'WA': ans[1] += 1
    if s == 'TLE': ans[2] += 1
    if s == 'RE': 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:
n = int(input())
cnt = [0]*4
out = ["AC","WA","TLE","RE"]
for i in range(n):
  inp = input()
  if inp == out[0]:
    cnt[0] += 1
  if inp == out[1]:
    cnt[1] += 1
  if inp == out[2]:
    cnt[2] += 1
  if inp == out[3]:
    cnt[3] += 1
for i in range(4):
  print(out[i]+ " x " + str(cnt[i]))

Submission status: Accepted

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

Submission status: Accepted

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

TC=[]
for i in range(N):
    TC.append(input())

for s in S:
    print("{} x {}".format(s,TC.count(s)))

Submission status: Accepted

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

n = int(input())
a = 0
b = 0
c = 0
d = 0
for i in range(n):
    s = input()

    if s == 'AC\n':
        a += 1
    elif s == 'WA\n':
        b += 1
    elif s == 'TLE\n':
        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:
from collections import Counter
n = int(input())
ans = Counter(input() for _ in range(n))
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{i} x {ans[i]}')

Submission status: Accepted

Solution code:
from collections import Counter
ans = Counter(input() for _ in range(int(input())))
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{i} x {ans[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().rstrip()] += 1
for k, v in S.items():
    print(f"{k} x {v}")

Submission status: Accepted

Solution code:
from collections import Counter
ans = Counter(input() for _ in range(int(input())))
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{i} x {ans[i]}')

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
ans = Counter(input() for _ in range(n))
for i in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{i} x {ans[i]}')

Submission status: Accepted

Solution code:
n = int(input())
di = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for _ in range(n):
    di[input()] += 1
for i, j in di.items():
    print(i, 'x', j)

Submission status: Accepted

Solution code:
from sys import stdin
input = stdin.readline
n = int(input())
a = [0]*4

for i in range(n):
    s = input().strip()
    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())
a = [0]*4

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())
#a,b=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]
dic={}
dic['AC']=0
dic['WA']=0
dic['TLE']=0
dic['RE']=0
key=['AC','WA','TLE','RE']

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

for k in key:
    print("{0} x {1}".format(k,dic[k]))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(300000)
from collections import Counter

def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI0(): return map(lambda s: int(s) - 1, sys.stdin.readline().split())
def LMI(): return list(map(int, sys.stdin.readline().split()))
def LMI0(): return list(map(lambda s: int(s) - 1, sys.stdin.readline().split()))
MOD = 10 ** 9 + 7
INF = float('inf')


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

c = Counter(S)
for label in ['AC', 'WA', 'TLE', 'RE']:
    print(label, 'x', c[label])

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 '+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())
data=[input() for _ in range(N)]
for d in ["AC","WA","TLE","RE"]:
  print("{} x {}".format(d,data.count(d)))

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:
from collections import Counter
N = int(input())
ans = Counter([input() for _ in range(N)])

for s in ['AC', 'WA', 'TLE', 'RE']:
    print(s, 'x', ans[s])

Submission status: Accepted

Solution code:
results = dict()
for t in ('AC', 'WA', 'TLE', 'RE'):
  results[t] = 0

n = int(input())
for _ in range(n):
  judge = input()
  results[judge] += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush
from bisect import bisect_left,bisect_right 
import sys,math,itertools,fractions,pprint
sys.setrecursionlimit(10**8)
mod = 10**9+7
INF = float('inf')
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))

n = inp()
d = defaultdict(int)
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())
C = 4*[0]
W = ['AC', 'WA', 'TLE', 'RE']
for i in range(N):
	S = input()
	for j in range(4):
		if S==W[j]:
			C[j] += 1

for j in range(4):
	print(W[j],'x', C[j])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

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

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

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

Submission status: Accepted

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

# check
checker = ["AC", "WA", "TLE", "RE"]
for c in checker:
    print(f"{c} x {S.count(c)}")

Submission status: Accepted

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

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

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
    if i == "WA":
        wa += 1
    if i == "TLE":
        tle += 1
    if 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:
n = int(input())
s = [input() for _ in range(n)]
for key in ('AC', 'WA', 'TLE', 'RE'):
    print('{} x {}'.format(key, s.count(key)))

Submission status: Accepted

Solution code:
len = int(input())

dict = {}

for i in range(len):
    result = input()

    if result in dict:
        dict[result] += 1
    else:
        dict[result] = 1

keys = ['AC', 'WA', 'TLE', 'RE']
for k in keys:
    cnt = 0
    if k in dict:
        cnt = dict[k]
    print("{0} x {1}".format(k, cnt))

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
    res = input()
    counter[res] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
j = [0]*4
s = []

for i in range(n):
    si = input()
    s.append(si)

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

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

Submission status: Accepted

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

import collections
c = collections.Counter(s)

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

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
count = Counter()
for _ in range(n):
    verdict = input()
    count[verdict] += 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:
n = int(input())
ls = []
for _ in range(n):
    tmp = input()
    ls.append(tmp)

print(f"AC x {ls.count('AC')}")
print(f"WA x {ls.count('WA')}")
print(f"TLE x {ls.count('TLE')}")
print(f"RE x {ls.count('RE')}")

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc173/tasks/abc173_b

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

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

for status in ["AC", "WA", "TLE", "RE"]:
    print("%s x %d" % (status, D[status]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
d=dict()
a=["AC","WA","TLE","RE"]
for x in a:
	d[x]=0
for _ in range(n):
	d[input()]+=1
for x in a:
	print(x + " x " + str(d[x]))