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())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    S=input()
    if S =='AC':
        AC += 1
    elif S =='TLE':
        TLE += 1
    elif S =='WA':
        WA += 1
    else:
        RE += 1
print(f"AC x {AC}\nWA x {WA}\nTLE x {TLE}\nRE x {RE}")

Submission status: Accepted

Solution code:
N = int(input())

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

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


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

Submission status: Accepted

Solution code:
results = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
N = int(input())
for _ in range(N):
    result = input()
    results[result] += 1

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

Submission status: Accepted

Solution code:
from collections import defaultdict

N = int(input())

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

result = ['AC', 'WA', 'TLE', 'RE']
for r in result:
  print(r, 'x', d[r])

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

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(N):
    if S[i] == "AC":
        ac += 1
    elif S[i] == "WA":
        wa += 1
    elif S[i] == "TLE":
        tle += 1
    elif S[i] == "RE":
        re += 1
print("AC x", ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)

Submission status: Accepted

Solution code:
N = int(input())
l = [0] * 4
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],sep=' ')
print('WA','x',l[1],sep=' ')
print('TLE','x',l[2],sep=' ')
print('RE','x',l[3],sep=' ')

Submission status: Accepted

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

n=int(input())
M=[input().rstrip() for _ in range(n)]
C = Counter(M)
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 = int(input())
S = [input() for _ in range(n)]

ans = [0, 0, 0, 0]

for _s in S:
    if _s == 'AC':
        ans[0] += 1
    elif _s == 'WA':
        ans[1] += 1
    elif _s == 'TLE':
        ans[2] += 1
    elif _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())

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

    r = [0, 0, 0, 0]
    for _ in range(n):
        i = input()

        if i == 'AC':
            r[0] += 1
        elif i == 'WA':
            r[1] += 1
        elif i == 'TLE':
            r[2] += 1
        else:
            r[3] += 1

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
a=0
b=0
c=0
d=0
while n:
    n-=1
    s=input()
    if(s=='AC'):a+=1
    if(s=='WA'):b+=1
    if(s=='TLE'):c+=1
    if(s=='RE'):d+=1
print('AC x %d'%a)
print('WA x %d'%b)
print('TLE x %d'%c)
print('RE x %d'%d)

Submission status: Accepted

Solution code:
from collections import Counter
from _collections import defaultdict
n = int(input())
ans = defaultdict(int)
for i in range(n):
    s = input()
    ans[s] += 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:
n = int(input())
s = ["AC", "WA", "TLE", "RE"]
s2 = [0, 0, 0, 0]
for i in range(n):
    s2[s.index(input())] += 1

print("AC x %d\nWA x %d\nTLE x %d\nRE x %d" % (s2[0], s2[1], s2[2], s2[3]))

Submission status: Accepted

Solution code:
N = int(input())
A = []
for _ in range(N):
    A.append(input())

from collections import Counter

c = Counter(A)

judge = ["AC", "WA", "TLE", "RE"]
for j in judge:
    if j in c:
        k = c[j]
    else:
        k = 0

    print(f"{j} x {k}")

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

N = int(input())

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

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

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

Submission status: Accepted

Solution code:
import collections
n=int(input())
s=[]
for i in range(n):
    s.append(input())
a=collections.Counter(s)

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

Submission status: Accepted

Solution code:
import numpy as np
import math
import scipy as sp
import queue
import collections

MOD = 10 ** 9 + 7
INF = 10 ** 9

def main(kwargs):
    S = kwargs["S"]
    cnt = collections.Counter(S)
    res = "AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(cnt["AC"], cnt["WA"], cnt["TLE"], cnt["RE"])
    return res

if __name__ == "__main__":
    kwargs = {}

    cin = input().split()
    kwargs["n"] = [int(i) for i in cin][0]

    kwargs["S"] = []
    for i in range(kwargs["n"]):
        cin = input().split()
        s = cin[0]
        kwargs["S"].append(s)

    cout = main(kwargs)
    print(cout)

Submission status: Accepted

Solution code:
n=int(input())
c0=0
c1=0
c2=0
c3=0
for c in range(n):
    s=input()
    if s=="AC":
        c0+=1
    elif s=="WA":
        c1+=1
    elif s=="TLE":
        c2+=1
    else:
        c3+=1
print("AC x "+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 _ in range(N)]

AC=S.count("AC")
WA=S.count("WA")
TLE=S.count("TLE")
RE=S.count("RE")

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())
dic = dict()
dic["AC"] = 0
dic["WA"] = 0
dic["TLE"] = 0
dic["RE"] = 0

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

Submission status: Accepted

Solution code:
import collections

n = int(input())

s = []

for _ in range(n):
    s.append(input())

s_total = dict(collections.Counter(s))

print("AC x", s_total.get("AC", default=0))
print("WA x", s_total.get("WA", default=0))
print("TLE x", s_total.get("TLE", default=0))
print("RE x", s_total.get("RE", default=0))

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:
n=int(input())
s=[input() for _ in range(n)]
ac,wa,tle,re=0,0,0,0

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

hash = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0,
}
for i in range(n):
    s = str(input())
    hash[s] += 1

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

Submission status: Accepted

Solution code:
N = int(input())

res = [0 for x in range(4)]

for i in range(N):
    a = input()
    if a == 'AC':
        res[0] += 1
    elif a == 'WA':
        res[1] += 1
    elif a == '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:
N = int(input())
S = [input() for _ in range(N)]
data = {}

for s in S:
    count = data.get(s, 0)
    data[s] = count + 1

for s in ['AC', 'WA', 'TLE', 'RE']:
    print(f"{s} x {data.get(s, 0)}")

Submission status: Accepted

Solution code:
n = int(input())
aclist = [0,0,0,0] #ac,wa,tle,re
for i in range(n):
    ans = input()
    if ans == 'AC':
        aclist[0] +=1
    if ans == 'WA':
        aclist[1] +=1
    if ans == 'TLE':
        aclist[2] +=1
    if ans == 'RE':
        aclist[3] +=1
print('AC x '+str(aclist[0]))
print('WA x '+str(aclist[1]))
print('TLE x '+str(aclist[2]))
print('RE x '+str(aclist[3]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def s0():return input()
def s1():return input().split()
def s2(n):return [input() for x in range(n)]
def s3(n):return [input().split() for _ in range(n)]
def s4(n):return [[x for x in s] for s in s2(n)]
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]
def t3(n):return [tuple(int(x) for x in input().split()) for _ in range(n)]
def p0(b,yes="Yes",no="No"): print(yes if b else no)
# from sys import setrecursionlimit
# setrecursionlimit(1000000)
# from collections import Counter,deque,defaultdict
# import itertools
# import math
# import networkx as nx
# from bisect import bisect_left,bisect_right
# from heapq import heapify,heappush,heappop
n=n0()
s=s2(n)

ac=0
tle=0
wa=0
re=0
for a in s:
    if a=="AC":
        ac+=1
    elif a=="TLE":
        tle+=1
    elif a=="WA":
        wa+=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:
#Problem B
N = int(input())
lst = [0,0,0,0] 
#AC, WA, TLE, RE

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

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

Submission status: Accepted

Solution code:
import sys

n = int(sys.stdin.readline())
results = {
    "AC": 0,
    "WA": 0,
    "TLE": 0,
    "RE": 0,
}
for _ in range(n):
    res = input()
    results[res] += 1
for key, value in results.items():
    print("%s x %d" % (key, value))

Submission status: Accepted

Solution code:
#from collections import deque,defaultdict
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7
#R = 998244353

def ddprint(x):
  if DBG:
    print(x)

n = inn()
ac = wa = tle = re = 0
for i in range(n):
    s = ins()
    if s =='AC':
        ac += 1
    elif s =='WA':
        wa += 1
    elif s =='TLE':
        tle += 1
    else:
        re += 1
print('AC x {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))

Submission status: Accepted

Solution code:
N = int(input())
c1,c2,c3,c4 = 0,0,0,0
for i in range(N):
    S = input()
    if S == "AC":
        c1 += 1
    if S == "WA":
        c2 += 1
    if S == "TLE":
        c3 += 1
    if S == "RE":
        c4 += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections 
d=collections.defaultdict(int) 
n=int(input())
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:
import collections

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

c = collections.Counter(ab)

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 = int(input())
l = [input() for i in range(n)]
print('AC x', l.count('AC'))
print('WA x', l.count('WA'))
print('TLE x', l.count('TLE'))
print('RE x', l.count('RE'))

Submission status: Accepted

Solution code:
n = int(input())

kekka = ["AC","WA","TLE","RE"]
ans = [0]*4

for _ in range(n):
    s = input()

    if s == kekka[0]:
        ans[0] += 1
    elif s == kekka[1]:
        ans[1] += 1
    elif s == kekka[2]:
        ans[2] += 1
    elif s == kekka[3]:
        ans[3] += 1

for i in range(4):
    print(kekka[i]+" x ",end="")
    print(ans[i])

Submission status: Accepted

Solution code:


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

    C = [0,0,0,0]

    for i in range(len(S)):
        if S[i] == "AC":
            C[0] += 1
        if S[i] == "WA":
            C[1] += 1
        if S[i] == "TLE":
            C[2] += 1
        if S[i] == "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]))



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))

n=I()
ac=0
wa=0
tle=0
re=0
for i in range(n):
    s=S()
    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())
ac=0
wa=0
tle=0
re=0
for i in range(n):
    tmp = input()
    if tmp == 'AC':
        ac+=1
    elif  tmp == 'WA':
        wa+=1
    elif  tmp == 'TLE':
        tle+=1
    elif  tmp == '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:
# coding: utf-8
N=int(input())
#A,B=map(int, input().split())
#List=list(map(int, input().split()))
SList=[(input()) for i in range(N)]
print("AC x",SList.count("AC"))
print("WA x",SList.count("WA"))
print("TLE x",SList.count("TLE"))
print("RE x",SList.count("RE"))

Submission status: Accepted

Solution code:
n = int(input())

slist = [0]*4
for i in range(n):
    result = input()

    if result == "AC":
        slist[0]+=1
    if result == "WA":
        slist[1]+=1
    if result == "TLE":
        slist[2]+=1
    if result == "RE":
        slist[3]+=1

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

Submission status: Accepted

Solution code:
N = int(input())

ac = wa = tle = 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())

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:
n = int(input())
cnt = [0] * 4
for _ in range(n):
    j = input()
    if j == "AC":
        cnt[0] += 1
    elif j == "WA":
        cnt[1] += 1
    elif j == "TLE":
        cnt[2] += 1
    elif j == "RE":
        cnt[3] += 1

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

Submission status: Accepted

Solution code:
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  s=str(input())
  if s=="AC":
    ac=ac+1
  if s=="WA":
    wa=wa+1
  if s=="TLE":
    tle=tle+1
  if s=="RE":
    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())
counter=[0,0,0,0]
for _ in range(n):
    s=input()
    if s=='AC':
        counter[0]+=1
    elif s=='WA':
        counter[1]+=1
    elif s=='TLE':
        counter[2]+=1
    else:
        counter[3]+=1

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

Submission status: Accepted

Solution code:
def main():

    n = int(input())
    ac_count = 0
    wa_count = 0
    tle_count = 0
    re_count = 0

    for _ in range(n):
        s = input()
        if s == "AC":
            ac_count += 1
        elif s == "WA":
            wa_count += 1
        elif s == "TLE":
            tle_count += 1
        else:
            re_count += 1
        
    print("AC x {}".format(ac_count))
    print("WA x {}".format(wa_count))
    print("TLE x {}".format(tle_count))
    print("RE x {}".format(re_count))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
li = []

sumac = 0
sumwa = 0
sumtle = 0
sumre = 0

for i in range(n):
    case = input()
    if (case == "AC"):
        sumac += 1
    elif (case == "WA"):
        sumwa += 1
    elif (case == "TLE"):
        sumtle += 1
    else:
        sumre += 1

print("AC x " + str(sumac))
print("WA x " + str(sumwa))
print("TLE x " + str(sumtle))
print("RE x "+str(sumre))

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:
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
    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 = []
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:
N = int(input())
dic = {"AC":0,"WA":0,"TLE":0,"RE":0}

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

for k, v in dic.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)]

counter = Counter(S)
print('AC x', counter['AC'])
print('WA x', counter['WA'])
print('TLE x', counter['TLE'])
print('RE x', counter['RE'])

Submission status: Accepted

Solution code:
from collections import Counter

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

cnt=Counter(s)
print("AC x "+ str(cnt["AC"]))
print("WA x "+str(cnt["WA"]))
print("TLE x "+str(cnt["TLE"]))
print("RE x "+str(cnt["RE"]))

Submission status: Accepted

Solution code:
ac,tle,re,wa=0,0,0,0
for _ in range(int(input())):

    s=(input())
    if s=='AC':
        ac+=1
    if s=='TLE':
        tle+=1
    if s=='RE':
        re+=1
    if s=='WA':
        wa+=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 = {"AC":0,"WA":0,"TLE":0,"RE":0}
for n in range(N):
  s = input()
  d[s] += 1
for s in d:
  print(s + " x " + str(d[s]))

Submission status: Accepted

Solution code:
import sys
from collections import Counter

input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


def main():
    N = int(input())
    S = [input().strip() for _ in range(N)]
    d = Counter(S)
    # print(d)
    for s in ["AC", "WA", "TLE", "RE"]:
        print("{} x {}".format(s, d[s]))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
from collections import defaultdict
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()

"""========main code==============="""

a=ii()
lol=["AC","WA","TLE","RE"]
d=defaultdict(int)
for _ in range(a):
    p=input()
    d[p]+=1
for i in lol:
    print(i,"x",d[i])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input())
s = [input() for _ in range(n)]
ans = {}
for judge in ["AC", "WA", "TLE", "RE"]:
    ans[judge] = 0
for x in s:
    ans[x] += 1
print("AC x", ans["AC"])
print("WA x", ans["WA"])
print("TLE x", ans["TLE"])
print("RE x", ans["RE"])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

N = int(sys.stdin.readline().strip())
ans = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(N):
    s = sys.stdin.readline().strip()
    ans[s] += 1

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n,*s=open(0).read().split()
print('AC x {}'.format(s.count('AC')))
print('WA x {}'.format(s.count('WA')))
print('TLE x {}'.format(s.count('TLE')))
print('RE x {}'.format(s.count('RE')))

Submission status: Accepted

Solution code:
from collections import defaultdict
dd = defaultdict(lambda:0)
n = int(input())
for _ in range(n):
    s = input()
    dd[s] += 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:
from sys  import stdin,stdout

import bisect
import math
def st():
    return list(stdin.readline().strip())

def inp():
    return int(stdin.readline())

def li():
    return list(map(int,stdin.readline().split()))

def mp():
    return map(int,stdin.readline().split())

def pr(n):
    stdout.write(str(n)+"\n")

def soe(limit):
    l=[1]*(limit+1)
    prime=[]
    for i in range(2,limit+1):
        if l[i]:
            for j in range(i*i,limit+1,i):
                l[j]=0

    for i in range(2,limit+1):
        if l[i]:
            prime.append(i)
    return prime

def segsoe(low,high):
    limit=int(high**0.5)+1
    prime=soe(limit)
    n=high-low+1
    l=[0]*(n+1)
    for i in range(len(prime)):
        lowlimit=(low//prime[i])*prime[i]
        if lowlimit<low:
            lowlimit+=prime[i]
        if lowlimit==prime[i]:
            lowlimit+=prime[i]
        for j in range(lowlimit,high+1,prime[i]):
            l[j-low]=1
    for i in range(low,high+1):
        if not l[i-low]:
            if i!=1:
                print(i)

def power(a,n):
    r=1
    while n:
        if n&1:
            r=(r*a)
            n=n-1
        else:
            a=(a*a)
            n=n>>1
    return r
    
def solve():
    n=inp()
    d={'AC':0,'WA':0,'TLE':0,'RE':0}
    for i in range(n):
        s=input()
        d[s]+=1
    print('AC x',d['AC'])
    print('WA x',d['WA'])
    print('TLE x',d['TLE'])
    print('RE x',d['RE'])
    


solve()

Submission status: Accepted

Solution code:
# coding: utf-8
from collections import Counter


def solve(*args: str) -> str:
    C = Counter(args[1:])
    ret = []
    for r in ('AC', 'WA', 'TLE', 'RE'):
        ret.append(r+' x '+str(C[r]))
    return '\n'.join(ret)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Submission status: Accepted

Solution code:
#!/usr/bin/env python
#pyrival orz
import os
import sys
from io import BytesIO, IOBase

"""
    for _ in range(int(input())):
    n,m=map(int,input().split())
    n=int(input())
    a = [int(x) for x in input().split()]
"""

def main():
    from collections import defaultdict
    ans=defaultdict(int)
    for _ in range(int(input())):
        ans[input()]+=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']))
    


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

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

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

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

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


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


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

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
S = list()
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:
n=int(input())
l=[]
for i in range(n):
  s=input()
  l.append(s)
  
ac=l.count('AC')
wa=l.count('WA')
tle=l.count('TLE')
re=l.count('RE')

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 k in range(n):
    s=str(input())
    if(s=='AC'):
        a+=1
    elif(s=="WA"):
        b+=1
    elif(s=="TLE"):
        c+=1
    elif(s=="RE"):
        d+=1
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)

Submission status: Accepted

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

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

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

for i in tab:
	print( i, 'x', tab[i])

Submission status: Accepted

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

num = defaultdict(int)
N = int(input())
for _ in range(N):
    num[input()] += 1
for s in ['AC', 'WA', 'TLE', 'RE']:
    print('{} x {}'.format(s, num[s]))

Submission status: Accepted

Solution code:
ss = ['AC', 'WA', 'TLE', 'RE']
from collections import Counter
n = int(input())
xx = []
for i in range(n):
    xx.append(input())
dic = Counter(xx)
for s in ss:
    print('{} x {}'.format(s, dic.get(s,0)))