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

countA = 0
countW = 0
countT = 0
countR = 0
for i in range(n):
  a = input()
  if a == "AC":
    countA += 1
  elif a == "WA":
    countW += 1
  elif a == "TLE":
    countT += 1
  elif a == "RE":
    countR += 1

print("AC x " + str(countA))
print("WA x " + str(countW))
print("TLE x " + str(countT))
print("RE x " + str(countR))

Submission status: Accepted

Solution code:
n=int(input())
a=0;w=0;r=0;tl=0
for _ in range(n):
  t=input()
  if(t=='AC'):
    a +=1
  elif(t=='WA'):
    w +=1
  elif(t=='RE'):
    r +=1
  elif(t=='TLE'):
    tl +=1
print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(tl))
print('RE x '+str(r))

Submission status: Accepted

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

for i in ["AC", "WA", "TLE", "RE"]:
    if i in counter:
        value = counter[i]
    else:
        value = 0
    print(f"{i} x {value}")

Submission status: Accepted

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

AC=0
WA=0
TLE=0
RE=0
for i in range(N):
    ans = input()
    
    if ans == 'AC':
        AC += 1
    elif ans == 'WA':
        WA += 1
    elif ans == 'TLE':
        TLE += 1
    elif ans == '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 as counter
#from collections import deque

ii = lambda:int(input())
mi = lambda:list(map(int,input().split()))
ix = lambda x:list(input() for _ in range(x))
mix = lambda x:list(mi() for _ in range(x))
iix = lambda x:list(int(input()) for _ in range(x))
##########

def resolve():
    n = ii()
    s = ix(n)
    judge = ["AC","WA","TLE","RE"]
    c = counter(s)
    for item in judge:
        print(item + " x " + str(c[item]))
    
if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for i in range(N)]
#S = [list(input().split()) 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())
S=[]
for _ in range(N):
    S.append(input())
ans=[0,0,0,0]
for i in S:
    if i=="AC":
        ans[0]+=1
    elif i=="WA":
        ans[1]+=1
    elif i=="TLE":
        ans[2]+=1
    else:
        ans[3]+=1
print("AC x",ans[0])
print("WA x",ans[1])
print("TLE x",ans[2])
print("RE x",ans[3])

Submission status: Accepted

Solution code:
##B
N = int(input())
S = list(input() for i in range(N))
a=0
b=0
c=0
d=0
for i in S:
    if i =="AC":
        a +=1
    elif i =="WA":
        b +=1
    elif i =="TLE":
        c +=1
    elif i =="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:
from sys import stdin


def main():
    N, *S = [i.strip() for i in stdin.readlines()]
    N = int(N)
    judge = ["AC", "WA", "TLE", "RE"]
    mul = " x "
    C = [0] * len(judge)
    for Si in S:
        C[judge.index(Si)] += 1
    print("\n".join((judge[i] + mul + str(C[i]) for i in range(len(judge)))))
    return


main()

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    N, *S = [i.strip() for i in stdin.readlines()]
    N = int(N)
    judge = ["AC", "WA", "TLE", "RE"]
    mul = " x "
    C = [0] * len(judge)
    for Si in S:
        C[judge.index(Si)] += 1
    print("\n".join([judge[i] + mul + str(C[i]) for i in range(len(judge))]))
    return


main()

Submission status: Accepted

Solution code:
import sys
def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
INF = 1000000000000

n = I()
result = [0]*4
for i in range(n):
    s = S()
    if(s == 'AC'):
        result[0] += 1
    elif(s == 'WA'):
        result[1] += 1
    elif(s == 'TLE'):
        result[2] += 1
    elif(s == 'RE'):
        result[3] += 1

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

Submission status: Accepted

Solution code:
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  st=input()
  if st=='AC':
    ac+=1
  elif st=="WA":
    wa+=1
  elif st=="TLE":
    tle+=1
  elif st=="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 _  in range(n)]

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:
n = int(input())
list = [input() for i in range(n)]
ac,wa,tle,re = 0,0,0,0
for j in list:
  if j == "AC":
    ac += 1
  if j == "WA":
    wa += 1
  if j == "TLE":
    tle += 1
  if j == "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, 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:
N = int(input())
D = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(N):
  D[input()] += 1
print("AC x {}".format(D["AC"]))
print("WA x {}".format(D["WA"]))
print("TLE x {}".format(D["TLE"]))
print("RE x {}".format(D["RE"]))

Submission status: Accepted

Solution code:
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
	jud = input()
	if jud == 'AC':
		ac += 1
	elif jud == 'WA':
		wa += 1
	elif jud == 'TLE':
		tle += 1
	elif jud == '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 = []
ans = {"AC":0, "WA":0, "TLE":0,"RE":0}
i = 0
for i in range(N):
    S.append(input())

for i in range(N):
    ans[S[i]] +=1
for k, v in ans.items():
    print(k + " x " + str(v))

Submission status: Accepted

Solution code:
N = int(input())
s = []
for i in range(N):
    s.append(str(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())
d = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0,
}

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

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

Submission status: Accepted

Solution code:
n = int(input())
t = {}
for i in range(n):
    s = input()
    if s in t:
        t[s] += 1
    else:
        t[s] = 1
ver = ['AC', 'WA', 'TLE', 'RE']
for v in ver:
    if v in t:
        res = t[v]
    else:
        res = 0
    print(v + ' x ' + str(res))

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 = input()
check = [input() for i in range(int(n))]

print('AC x %d' % check.count('AC'))
print('WA x %d' % check.count('WA'))
print('TLE x %d' % check.count('TLE'))
print('RE x %d' % check.count('RE'))

Submission status: Accepted

Solution code:
N = int(input())

AC = WA = TLE = RE = 0
for i in range(0, N, 1):
  t = str(input())
  if t == "AC":
    AC += 1
  elif t == "WA":
    WA += 1
  elif t == "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())

verdict = []

for i in range(n):
    m = input()
    verdict.append(m)


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

for i in range(n):

    if verdict[i] == "AC":
        AC += 1
    elif verdict[i] == "WA":
        WA += 1
    elif verdict[i] == "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())

l = []
for i in range(N):
    S = input()
    l.append(S)
    
print('AC x '+str(l.count('AC')))
print('WA x '+str(l.count('WA')))
print('TLE x '+str(l.count('TLE')))
print('RE x '+str(l.count('RE')))

Submission status: Accepted

Solution code:
N = int(input())
X = []

for i in range(N):
  x = input()
  X.append(x)

def Judge():
  k = 0
  l = 0
  m = 0
  n = 0
  for i in range(N):
    if X[i] == 'AC':
      k+=1
    if X[i] == 'WA':
      l+=1
    if X[i] == 'TLE':
      m+=1
    if X[i] == 'RE':
      n+=1
  print("AC " + "x " + str(k))
  print("WA " + "x " + str(l))
  print("TLE " + "x " + str(m))
  print("RE " + "x " + str(n))
Judge()

Submission status: Accepted

Solution code:
t=int(input())
ac=0
wa=0
tle=0
re=0
for _ in range(t):
  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())
store={'AC':0,'WA':0,'TLE':0,'RE':0}
while n:
    c=input()
    store[c]+=1
    n-=1

for keys in store:
    print(keys,'x',store[keys])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
S = [input() for _ in range(N)] + ["AC", "WA", "TLE", "RE"]

S = Counter(S)

print("AC x "+ str(S["AC"]-1) )
print("WA x "+ str(S["WA"]-1) )
print("TLE x "+ str(S["TLE"]-1) )
print("RE x "+ str(S["RE"]-1) )

Submission status: Accepted

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

N = i()
S = [s() 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:
n=int(input())
s=[input() for i in range(n)]
for v in ['AC', 'WA', 'TLE', 'RE']:
    print('{0} x {1}'.format(v, s.count(v)))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
def line_to_int(): return int(sys.stdin.readline())
def line_to_each_int(): return map(int, sys.stdin.readline().split())
def line_to_list(): return list(map(int, sys.stdin.readline().split()))
def line_to_list_in_iteration(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
# def dp(init, i, j): return [[init]*i for i2 in range(j)]
import sys
#from collections import defaultdict #d = defaultdict(int) d[key] += value
#from collections import Counter # a = Counter(A).most_common()
from itertools import accumulate #A = [0]+list(accumulate(A))
import bisect #bisect.bisect_left(B, a), bisect.bisect_right(B,a)
from collections import Counter

n = line_to_int()
s = []
for i in range(n):
    s.append(sys.stdin.readline().strip())
# print(s)
ans = Counter(s)
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:

n = int(input())
ac = wa = tle = re = 0

for i in range(n):
    t = input()
    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 ",ac)
print("WA x ",wa)
print("TLE x ",tle)
print("RE x ",re)

Submission status: Accepted

Solution code:
n=int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(n):
    s=input()
    if s=="AC":
        AC+=1
    elif s=="WA":
        WA+=1
    elif s=="TLE":
        TLE+=1
    else:
        RE+=1
print("AC","x", AC)
print("WA","x", WA)
print("TLE","x", TLE)
print("RE","x", 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 {0}".format(ac))
print("WA x {0}".format(wa))
print("TLE x {0}".format(tle))
print("RE x {0}".format(re))

Submission status: Accepted

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

n = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

for i in range(n):
	verdict = input().strip()
	table[verdict]+=1

for v in table:
	print('{0} x {1}'.format(v, table[v]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import floor,ceil,sqrt,factorial,log
from collections import Counter, deque
from functools import reduce
import numpy as np
import itertools
def S(): return input()
def I(): return int(input())
def MS(): return map(str,input().split())
def MI(): return map(int,input().split())
def FLI(): return [int(i) for i in input().split()]
def LS(): return list(MS())
def LI(): return list(MI())
def LLS(): return [list(map(str, l.split() )) for l in input()]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def LLSN(n: int): return [LS() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]

N = I()
c0, c1, c2, c3 = 0,0,0,0
for i in range(N):
    s = S()
    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() )

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

for i in range(N):
  x = input()
  if x == "AC" :
    ac += 1
    
  elif x == "WA" :
    wa += 1
    
  elif x == "TLE" :
    tle += 1
    
  elif x == "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())

dic = {}
dic["AC"] = 0
dic["WA"] = 0
dic["TLE"] = 0
dic["RE"] = 0

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

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

Submission status: Accepted

Solution code:
n = int(input())
string_list = [input() for i in range(n)]
ac = 0
wa = 0
tle = 0
re = 0
for s in string_list:
    if (s == "AC"):
        ac = ac + 1
    elif (s == "TLE"):
        tle = tle + 1
    elif (s == "WA"):
        wa = wa + 1
    else:
        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())
dic={"AC":0,"WA":0,"TLE":0,"RE":0}
for _ in range(n):
  s=input()
  dic[s]+=1
for k,v in dic.items():
  print("{0} x {1}".format(k,v))

Submission status: Accepted

Solution code:
N = int(input())
judge = ['AC', 'WA', 'TLE', 'RE']
C = [[], [], [], []]
for i in range(N):
  S = str(input())
  j = judge.index(S)
  C[j].append(i)

Cn = [len(j) for j in C]
for i in range(4):
  print(judge[i], 'x', Cn[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:
n=int(input())
c={}
for _ in range(n):
  s=input()
  c[s]=c.get(s,0)+1
for j in ('AC','WA','TLE','RE'):
  print(j,'x',c.get(j,0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n_entradas = int(input())
contador = 0
vetor=[]
while (contador<n_entradas):
    situacao = str(input())
    vetor.append(situacao)
    contador=contador+1    
print('AC x',vetor.count('AC'))
print('WA x',vetor.count('WA'))
print('TLE x',vetor.count('TLE'))
print('RE x',vetor.count('RE'))

Submission status: Accepted

Solution code:
import sys
#import string
from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def solve():
    n = int(stdin.readline().rstrip())
    #A, B, C = map(int, stdin.readline().rstrip().split())
    #l = list(map(int, stdin.readline().rstrip().split()))
    #numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]
    #word = [stdin.readline().rstrip() for _ in range(n)]
    #number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]
    #zeros = [[0] * w for i in range(h)]
    S = []
    for i in range(n):
        s = str(stdin.readline().rstrip())
        S.append(s)
    c = Counter(S)
    print("AC x "+str(c["AC"]))
    print("WA x "+str(c["WA"]))
    print("TLE x "+str(c["TLE"]))
    print("RE x "+str(c["RE"]))

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    ac,wa,tle,re = 0,0,0,0
    for i in range(n):
        s = input()
        if s=='AC':
            ac+=1
        elif s=='WA':
            wa+=1
        elif s=='TLE':
            tle+=1
        else:
            re+=1
    print('AC x {}'.format(ac))
    print('WA x {}'.format(wa))
    print('TLE x {}'.format(tle))
    print('RE x {}'.format(re))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import collections
a=int(input())
b=[input() for i in range(a)]

c=collections.Counter(b)
n,m=zip(*c.most_common())
n=list(n)
m=list(m)
result=[0]*4
for i in range(len(n)):
    if n[i]=='AC':
        result[0]=m[i]
    if n[i]=='WA':
        result[1]=m[i]
    if n[i]=='TLE':
        result[2]=m[i]
    if n[i]=='RE':
        result[3]=m[i]
    
print('AC x',result[0])
print('WA x',result[1])
print('TLE x',result[2])
print('RE x',result[3])

Submission status: Accepted

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

AC_cnt = s.count('AC')
WA_cnt = s.count('WA')
TLE_cnt = s.count('TLE')
RE_cnt = s.count('RE')

print('AC x', AC_cnt)
print('WA x', WA_cnt)
print('TLE x', TLE_cnt)
print('RE x', RE_cnt)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import collections
s = []
def main():
  n = int(input())
  for i in range(n):
    s.append(input())
  col = collections.Counter(s)
  for i in ['AC','WA','TLE','RE']:
    print(i,'x',col[i])
    
    
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
A=[]
for i in range(N):
    A.append(input())
a=0
w=0
t=0
r=0
for i in A:
    if i=='AC':
        a+=1
    elif i =='WA':
        w+=1
    elif i =='TLE':
        t+=1
    else:
        r+=1
print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print('RE x '+str(r))

Submission status: Accepted

Solution code:
N = int(input())

result = [input() for _ in range(N)]

C_AC,C_TLE,C_WA,C_RE = [0,0,0,0]

for i in result:
  if i == "AC":
    C_AC += 1
  elif i == "WA":
    C_WA += 1
  elif i == "TLE":
    C_TLE += 1
  elif i == "RE":
    C_RE += 1

print("AC x " + str(C_AC))
print("WA x " + str(C_WA))
print("TLE x " + str(C_TLE))
print("RE x " + str(C_RE))

Submission status: Accepted

Solution code:
verdicts = {'AC':0,'WA':0,'TLE':0,'RE':0}
N = int(input())
string = []

for i in range(N):
    input_i = input()
    if input_i == 'AC':
        verdicts['AC'] += 1
    elif input_i == 'WA':
        verdicts['WA'] += 1
    elif input_i == 'TLE':
        verdicts['TLE'] += 1
    elif input_i == 'RE':
        verdicts['RE'] += 1

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

Submission status: Accepted

Solution code:
n = int(raw_input())

t = ['AC', 'WA', 'TLE', 'RE']
d = {}
for _ in xrange(n):
    s = raw_input()
    d[s] = d.get(s, 0) + 1
for k in t:
    print '%s x %d' % (k, d.get(k, 0))

Submission status: Accepted

Solution code:
#import numpy as np
import sys, math
from itertools import permutations, combinations
from collections import defaultdict, Counter, deque
from math import factorial#, gcd
from bisect import bisect_left, bisect_right #bisect_left(list, value)
sys.setrecursionlimit(10**7)
enu = enumerate
MOD = 10**9+7
def input(): return sys.stdin.readline()[:-1]
pl = lambda x: print(*x, sep='\n')

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

res = defaultdict(int)
for s in S:
    res[s] += 1

# print(res)
ans = ['AC', 'WA', 'TLE', 'RE']
for an in ans:
    if res[an]>0:
        print(an, 'x', res[an])
    else:
        print(an, 'x', 0)

Submission status: Accepted

Solution code:
n = int(input())
ac, wa, tle, re = 0, 0, 0, 0
for i in range(n):
    s = input()
    if s == 'AC':
        ac += 1
    elif s == 'WA':
        wa += 1
    elif s == 'TLE':
        tle += 1
    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())

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

for i in range(n):
    judge = input()
    if judge == "AC":
        c0 += 1
    elif judge == "WA":
        c1 += 1
    elif judge == "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:
d = {"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(int(input())):
  d[input()]+=1
for i in d:
  print(i,"x",d[i])

Submission status: Accepted

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

n = int(input())
for i in range(n):
    t = input()
    data[t] += 1

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

Submission status: Accepted

Solution code:
tr=int(input())

a=0
w=0
t=0
r=0

for i in range(tr):
   
    word=input()
    if word=='AC':
        a+=1
    elif word=='WA':
        w+=1
    elif word=='TLE':
        t+=1
    else:
        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:
d={"AC":0, "WA":0, "TLE":0, "RE":0}
n = int(input())
for i in range(n):
    a = input()
    d[a]+=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:
cnt = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(int(input())):
               s = input()
               cnt[s] += 1
for i in ['AC','WA','TLE','RE']:
               print(f'{i} x {cnt[i]}')

Submission status: Accepted

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

dic = {}
dic["TLE"]=0
dic["AC"]=1
dic["WA"]=2
dic["RE"]=3

arr = [0 for i in range(4)]

for i in range(len(S)):
  arr[dic[S[i]]] += 1

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)
from math import floor,ceil,sqrt,factorial,log,gcd
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
from operator import itemgetter
from fractions import gcd
mod = 10 ** 9 + 7
inf = float('inf')
ninf = -float('inf')

#Pythonを用いる場合
#numpy 1.18.0, scipy 1.4.1, scikit-learn 0.22, numba 0.47.0, networkx 2.4
 
import numpy as np
from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson
from scipy.sparse import csr_matrix

 
#整数input
def ii(): return int(sys.stdin.readline().rstrip()) #int(input())
def mii(): return map(int,sys.stdin.readline().rstrip().split())
def limii(): return list(mii()) #list(map(int,input().split()))
def lin(n:int): return [ii() for _ in range(n)]
def llint(n: int): return [limii() for _ in range(n)]
#文字列input
def ss(): return sys.stdin.readline().rstrip() #input()
def mss(): return sys.stdin.readline().rstrip().split()
def limss(): return list(mss()) #list(input().split())
def lst(n:int): return [ss() for _ in range(n)]
def llstr(n: int): return [limss() for _ in range(n)]

#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？
#本当に貪欲法か？ DP法では？？

n=ii()
ans=[0,0,0,0]

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

for i in range(4):
    if i==0:
        print("AC x "+str(ans[0]))
    elif i==1:
        print("WA x "+str(ans[1]))
    elif i==2:
        print("TLE x "+str(ans[2]))
    else:
        print("RE x "+str(ans[3]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin,stdout
import math
from collections import Counter,defaultdict
LI=lambda:list(map(int,input().split()))
MAP=lambda:map(int,input().split())
IN=lambda:int(input())
S=lambda:input()

def case():
    a=b=c=d=0
    for i in range(IN()):
        s=S()
        if s=="AC":a+=1
        elif s=="TLE":b+=1
        elif s=="WA":c+=1
        else:d+=1
    print("AC","x",a)
    print("WA","x",c)
    print("TLE","x",b)
    print("RE","x",d)
for _ in range(1):
    case()

Submission status: Accepted

Solution code:
N = int(input())
a=b=c=d = 0
for i in range(N):
  char = input()
  if char =='AC':
    a += 1
  if char =='WA':
    b += 1
  if char =='TLE':
    c += 1
  if char =='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:

count = int(input())
# print(count)
a = 0
b = 0
c = 0
d = 0
while count:
	val = input()
	# print(val)
	if val == 'AC':
		a += 1
	elif val == 'WA':
		b += 1
	elif val == 'TLE':
		c += 1
	elif val == 'RE':
		d += 1
	count -= 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:
judges = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
n = int(input())
for _ in range(n):
    s = input()
    judges[s] += 1
for key, value in judges.items():
    print(key + ' x ' + str(value))