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:
import collections
n = int(input())
verdicts = [input() for _ in range(n)]

counter = collections.Counter(verdicts)


for k in ("AC", "WA", "TLE", "RE"):
    print("%s x %s" % (k, counter.get(k, 0)))

Submission status: Accepted

Solution code:
from collections import defaultdict
import sys
input = sys.stdin.readline
N = int(input())

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

print("AC x", d["AC"])
print("WA x", d["WA"])
print("TLE x", d["TLE"])
print("RE x", d["RE"])

Submission status: Accepted

Solution code:
from sys import stdin
import sys

N = int(input())
c1 = 0
c2 = 0
c3 = 0
c4 = 0
for i in range(N):
    a = input()
    if a == 'AC':
        c1 += 1
    elif a == 'WA':
        c2 += 1
    elif a == 'TLE':
        c3 += 1
    elif a == 'RE':
        c4 += 1
print("AC x ", c1)
print("WA x ", c2)
print("TLE x ", c3)
print("RE x ", c4)

Submission status: Accepted

Solution code:
import sys
from collections import deque
import numpy as np
import math
sys.setrecursionlimit(10**6)
def S(): return sys.stdin.readline().rstrip()
def SL(): return map(str,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def Main():
    n = I()
    judge = [0]*4
    for _ in range(n):
        s = S()
        if s=='AC': judge[0] += 1
        elif s=='WA':   judge[1] += 1
        elif s=='TLE':  judge[2] += 1
        else:   judge[3] += 1
    
    print(f'AC x {judge[0]}')
    print(f'WA x {judge[1]}')
    print(f'TLE x {judge[2]}')
    print(f'RE x {judge[3]}')
    return

if __name__=='__main__':
    Main()

Submission status: Accepted

Solution code:
from collections import defaultdict

N = int(input())

d = defaultdict(int)

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

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

for s in li:
    print(s + " x " + str(d[s]))

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=="TLE":
        tle += 1
    if s=="WA":
        wa += 1
    if s=="RE":
        re += 1
for s,c in [("AC", ac), ("WA", wa), ("TLE", tle), ("RE", re)]:
    print("{} x {}".format(s, c))

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

def solve():
    n = int(input())
    C = defaultdict(int)
    for _ in range(n):
        s = input().strip()
        C[s] += 1
    
    print('AC x', C['AC'])
    print('WA x', C['WA'])
    print('TLE x', C['TLE'])
    print('RE x', C['RE'])


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0

for _ in range(N):
    s = input()
    if s == "AC":
        AC += 1
    elif s == "WA":
        WA += 1
    elif s == "TLE":
        TLE += 1
    elif s == "RE":
        RE += 1
print("AC x {}".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 defaultdict
def solve():
    N = int(input())
    d = defaultdict(int)

    for _ 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"]))
if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
from collections import Counter

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

    result_strs = ['AC', 'WA', 'TLE', 'RE']
    for r in result_strs:
        print(f'{r} x {c[r]}')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

lis = [0] * 4
for _ in range(N):
  S = input()
  if S == 'AC':
    lis[0] += 1
  elif S == 'WA':
    lis[1] += 1
  elif S == 'TLE':
    lis[2] += 1
  elif S == 'RE':
    lis[3] += 1
    
print('AC x {}'.format(lis[0]))
print('WA x {}'.format(lis[1]))
print('TLE x {}'.format(lis[2]))
print('RE x {}'.format(lis[3]))

Submission status: Accepted

Solution code:
import sys

N=int(sys.stdin.readline())

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

for i in range(N):
  s=sys.stdin.readline().strip()
  d[s]+=1
  
print("AC x",d["AC"])
print("WA x",d["WA"])
print("TLE x",d["TLE"])
print("RE x",d["RE"])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
n=int(input())
ac,wa,tle,re=0,0,0,0
for _ in range(n):
    s=input().rstrip()
    if s=='AC':
        ac+=1
    elif s=='WA':
        wa+=1
    elif s=='TLE':
        tle+=1
    else:
        re+=1

print('AC x %d' % ac)
print('WA x %d' % wa)
print('TLE x %d' % tle)
print('RE x %d' % re)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    N = ii()
    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 {}".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:
N = int(input())
table = [input() for _ in range(N)]

print("AC x " + str(table.count('AC')))
print("WA x " + str(table.count('WA')))
print("TLE x " + str(table.count('TLE')))
print("RE x " + str(table.count('RE')))

Submission status: Accepted

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

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

for s_i in s:
    cnt[ s_i ] += 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:
def solve():
    n=int(input())
    d={
        'AC':0,
        'WA':0,
        'TLE':0,
        'RE':0
    }

    for i in range(n):
        si=input()
        d[si]+=1
    
    for k, v in d.items():
        print(f'{k} x {v}')


if __name__=='__main__':
    t=1
    for _ in range(t):
        solve()

Submission status: Accepted

Solution code:
from math import ceil
from collections import defaultdict as dd
import sys
input=sys.stdin.readline
#t=int(input())
#while t:
l=['AC','WA','TLE','RE']
ans=[0]*4
n=int(input())
for i in range(n):
    s=input().split()[0]
    if(s==l[0]):
        ans[0]+=1
    if(s==l[1]):
        ans[1]+=1
    if(s==l[2]):
        ans[2]+=1
    if(s==l[3]):
        ans[3]+=1
for i in range(4):
    print(l[i],'x',ans[i])

Submission status: Accepted

Solution code:
N = int(input())
a = 0
b = 0
c = 0
d = 0

for _ in range(N):
  s = input()
  if s == "AC":
    a += 1
  elif s == "WA":
    b += 1
  elif s == "TLE":
    c += 1
  else:
    d += 1
print("AC","x",a)
print("WA","x",b)
print("TLE","x",c)
print("RE","x",d)

Submission status: Accepted

Solution code:
from math import ceil,floor,comb,factorial,gcd,pow,sqrt,log2,cos,sin,tan,pi,inf
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heappop,heappush
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
c = [0]*4

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

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

Submission status: Accepted

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

n = int(input())
d = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0
}
for i in range(n):
    s = input().rstrip('\n')
    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())

li = [input() for _ in range(n)]

check = ['AC', 'WA', 'TLE', 'RE']
ans = [0] * 4

for i in li:
    for j in range(4):
        if i == check[j]:
            ans[j] += 1
            
for i in range(4):
    print(check[i] + ' x ' + str(ans[i]))

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 "+str(A))
print("WA x "+str(W))
print("TLE x "+str(T))
print("RE x "+str(R))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
import pprint

sys.setrecursionlimit(10 ** 6)

class Logger:
	def __init__(self, debug):
		self.debug = debug
	def print(self, *args):
		if self.debug:
			pprint.pprint(args)


def main():
	log = Logger(0)
	n = int(sys.stdin.readline())
	s = []
	a = {}
	for i in range(n):
		s.append(input())
	for i in range(n):
		a[s[i]] = a.get(s[i], 0) + 1
	log.print(a)
	print("AC x {}".format(a.get("AC", 0)))
	print("WA x {}".format(a.get("WA", 0)))
	print("TLE x {}".format(a.get("TLE", 0)))
	print("RE x {}".format(a.get("RE", 0)))

	


main()

Submission status: Accepted

Solution code:
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res

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

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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
N = int(input())
dic=defaultdict(int)
for i in range(N):
  key=input()
  dic[key] += 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())
a = w = t = r = 0
for i in range(N):
    s = input()
    if s == "AC":
        a += 1
    elif s == "WA":
        w += 1
    elif s == "TLE":
        t += 1
    elif s == "RE":
        r += 1

print("AC x {}".format(a))
print("WA x {}".format(w))
print("TLE x {}".format(t))
print("RE x {}".format(r))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import collections


def summarize(ss):
    ctr = collections.Counter(ss)
    return ctr


def main():
    n = int(input())
    ss = [input() for _ in range(n)]
    ctr = summarize(ss)
    for status in "AC WA TLE RE".split():
        print("{} x {}".format(status, ctr[status]))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# coding:utf-8
n = int(input())
s = [input() for _ in range(n)]
# print(s)

print('AC x ' + str(s.count('AC')))
print('WA x ' + str(s.count('WA')))
print('TLE x ' + str(s.count('TLE')))
print('RE x ' + str(s.count('RE')))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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:
from sys import stdin, stdout
import heapq
import cProfile
from collections import Counter, defaultdict, deque
from functools import reduce
import math
from bisect import bisect,bisect_right,bisect_left

def get_int():
    return int(stdin.readline().strip())


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


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

n = get_int()
dic = defaultdict(int)
for _ in range(n):
    st = input()
    dic[st] += 1
for val in ['AC','WA','TLE','RE']:
    print(val+" x "+str(dic[val]))

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
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:
N=int(input())
res=["AC","WA","TLE","RE"]
C=[0,0,0,0]
for i in range(N):
    C[res.index(input())]+=1

for j in range(4):
    print(res[j]+" x "+str(C[j]))

Submission status: Accepted

Solution code:
n = int(input())
ans = [0]*4
ls = ['AC','WA','TLE','RE']
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
    elif s == 'RE':
        ans[3]+=1

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

Submission status: Accepted

Solution code:
#import sys
MOD = 10 ** 9 + 7
INFI = 10**10
#input = sys.stdin.readline
import math
from collections import deque
import itertools
import heapq
#import bisect
from fractions import Fraction
import copy
from functools import lru_cache
from collections import defaultdict
import pprint

#oo=list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
# ko=list("abcdefghijklmnopqrstuvwxyz")

def sosuhante(n):
    for k in range(2, int(math.sqrt(n))+1):
        if n% k ==0:
            return False
    return True
def cmb(n, r):
    if n - r < r: r = n - r
    if r == 0: return 1
    if r == 1: return n

    numerator = [n - r + k + 1 for k in range(r)]
    denominator = [k + 1 for k in range(r)]

    for p in range(2,r+1):
        pivot = denominator[p - 1]
        if pivot > 1:
            offset = (n - r) % p
            for k in range(p-1,r,p):
                numerator[k - offset] /= pivot
                denominator[k] /= pivot

    result = 1
    for k in range(r):
        if numerator[k] > 1:
            result *= int(numerator[k])

    return result

def kingaku(a,b,n):
    keta=len(str(n))
    return a*n+b*keta

def my_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

#    h,w,a,b = map(int, input().split())
#    c = [[0 for j in range(n)] for i in range(n)]

def ret(a):
    c=[None]*(len(a)-1)
    if len(a)==1:
        return a[0]
    elif len(a)==0:
        return 0
    for i in range(1,len(a)):
        c[i-1]=abs(a[i]-a[i-1])
    return ret(c)

def soinsubunkai(n):
    a = []
    i = 1
    while i*i <= n:
        if n % i == 0 and i!=1:
            a.append(i)
            n=n//i

        if n% i !=0 or i==1:
            i += 1
    nokori=[n]
    return a + nokori

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

def main():
    n=int(input())
    s=[0,0,0,0]
    for i in range(n):
        a=input()
        if a=="AC":
            s[0]+=1
        elif a=="WA":
            s[1]+=1
        elif a=="TLE":
            s[2]+=1
        else:
            s[3]+=1
    print("AC x "+str(s[0]))
    print("WA x " + str(s[1]))
    print("TLE x " + str(s[2]))
    print("RE x " + str(s[3]))



if __name__ == "__main__":

    main()

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
sys.setrecursionlimit(10 ** 8)
from itertools import accumulate
from itertools import permutations
from itertools import combinations
from collections import defaultdict
from collections import Counter
import fractions
import math
from collections import deque
from bisect import bisect_left
from bisect import bisect_right
from bisect import insort_left
import itertools
from heapq import heapify
from heapq import heappop
from heapq import heappush
import heapq
from copy import deepcopy
from decimal import Decimal
alf = list("abcdefghijklmnopqrstuvwxyz")
ALF = list("ABCDEFGHIJKLMNOPQRSTUVWXYZ")
#import numpy as np
INF = float("inf")
#d = defaultdict(int)
#d = defaultdict(list)
d = defaultdict(int)
N = int(input())
for i in range(N):
    s = list(input())[:-1]
    if s[0] == "A":
        d["A"] += 1
    elif s[0] == "W":
        d["W"] += 1
    elif s[0] == "T":
        d["T"] += 1
    else:
        d["R"] += 1
print("AC","x",d["A"])
print("WA","x",d["W"])
print("TLE","x",d["T"])
print("RE","x",d["R"])

Submission status: Accepted

Solution code:
#create date: 2020-07-05 21:01

import sys
stdin = sys.stdin
from collections import defaultdict

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n = ni()
    s = defaultdict(int)
    for _ in range(n):
        a = ns()
        s[a] += 1

    print("AC x {}".format(s["AC"]))
    print("WA x {}".format(s["WA"]))
    print("TLE x {}".format(s["TLE"]))
    print("RE x {}".format(s["RE"]))
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N=int(input())
ans_list = [0]*4

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

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

Submission status: Accepted

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


def solve(N: int, S: "List[str]"):
    r = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    for s in S:
        r[s] += 1

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


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [next(tokens) for _ in range(N)]  # type: "List[str]"
    solve(N, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

N, = map(int, input().split())

ac = 0
wa = 0
tle = 0
re = 0
for _ in range(N):
    s, = map(str, input().split())
    if s=='AC':
        ac += 1
    elif s=='WA':
        wa += 1
    elif s=='TLE':
        tle += 1
    elif s=='RE':
        re += 1

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

Submission status: Accepted

Solution code:
from collections import defaultdict


N = int(input())
ans = defaultdict(int)
for _ in range(N):
    ans[input()] += 1
for string in ("AC", "WA", "TLE", "RE"):
    print(f"{string} x {ans[string]}")

Submission status: Accepted

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

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

for i, x in D.items():
  print(i+" x "+str(x))

Submission status: Accepted

Solution code:
N = int(input())
c_ac = 0
c_wa = 0
c_tle = 0
c_re = 0

for _ in range(N):
    s = input()
    if s == 'AC':
        c_ac += 1
    elif s == 'WA':
        c_wa += 1
    elif s == 'TLE':
        c_tle += 1
    else:
        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:
n = int(input())
ss = [input() for _ in range(n)]
ans = {}
ans['AC'] = 0
ans['WA'] = 0
ans['TLE'] = 0
ans['RE'] = 0
for s in ss:
    ans[s] += 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():
    from builtins import int, map, list, print
    from collections import defaultdict
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    d = defaultdict(lambda: 0)
    N = input_number()
    for i in range(N):
        s = input()
        d[s] += 1
    print(f"AC x {d['AC']}")
    print(f"WA x {d['WA']}")
    print(f"TLE x {d['TLE']}")
    print(f"RE x {d['RE']}")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# import sys
# input = sys.stdin.readline
# import re
import itertools

def main():
    n = int(input())
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for _ in range(n):
        s = str(input())
        if s == "AC":
            ac += 1
        elif s == "WA":
            wa += 1
        elif s == "TLE":
            tle += 1
        elif s == "RE":
            re += 1
    print("AC x", ac)
    print("WA x", wa)
    print("TLE x", tle)
    print("RE x", re)

def count_tento(l, cur):
    count = 0
    for v in l:
        if v > cur:
            count += 1
    return count

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

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import defaultdict
N = int(input())
c = defaultdict(int)
for i in range(N):
    s = input().strip()
    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:
def main():
    n, *s = open(0).read().split()
    ac, wa, tle = s.count('AC'), s.count('WA'), s.count('TLE')
    re = int(n) - (ac + wa + tle)
    print('AC x', ac)
    print('WA x', wa)
    print('TLE x', tle)
    print('RE x', re)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(n):
    a=input()
    if a=="AC":
        AC+=1
    elif a=="TLE":
        TLE+=1
    elif a=="WA":
        WA+=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:
import collections as cl

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

c = cl.Counter(S_list)

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

for k in d:
    print(k, "x", d[k])

Submission status: Accepted

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

from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
from collections import deque, defaultdict, Counter
from itertools import combinations, permutations, combinations_with_replacement
from itertools import accumulate
from math import ceil, sqrt, pi, radians, sin, cos

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

N = int(input())
S = [input() for _ in range(N)]
#N, M = map(int, input().split())
#A = list(map(int, input().split()))
#A = [int(input()) for _ in range(N)]
#ABC = [list(map(int, input().split())) for _ in range(N)]

cnt = [0] * 4
for s in S:
    if s == "AC":
        cnt[0] += 1
    elif s == "WA":
        cnt[1] += 1
    elif s == "TLE":
        cnt[2] += 1
    elif s == "RE":
        cnt[3] += 1

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

Submission status: Accepted

Solution code:
from collections import OrderedDict
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(100000)


def main():
    N = int(input().strip())
    d = OrderedDict({
        "AC": 0,
        "WA": 0,
        "TLE": 0,
        "RE": 0
    })

    for _ in range(N):
        s = input().strip()
        d[s] += 1

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

for _ in range(n):
    s=input()
    if s=='AC':
        ac+=1
    elif s=='WA':
        wa+=1
    elif s=='TLE':
        tle+=1
    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:
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(sys.stdin.readline())
def ria(): return list(map(int, sys.stdin.readline().split()))
def ws(s): sys.stdout.write(s); sys.stdout.write('\n')
def wi(n): sys.stdout.write(str(n)); sys.stdout.write('\n')
def wia(a, sep=' '): sys.stdout.write(sep.join([str(x) for x in a])); sys.stdout.write('\n')


def solve(n, s):
    c0 = sum(1 for si in s if si == 'AC')
    c1 = sum(1 for si in s if si == 'WA')
    c2 = sum(1 for si in s if si == 'TLE')
    c3 = sum(1 for si in s if si == 'RE')
    ws("AC x {0}".format(c0))
    ws("WA x {0}".format(c1))
    ws("TLE x {0}".format(c2))
    ws("RE x {0}".format(c3))


def main():
    n = ri()
    s = []
    for i in range(n):
        s.append(rs())
    solve(n, s)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(N):
  c = input()
  if(c=="AC"):
    ac += 1
  elif(c=="WA"):
    wa += 1
  elif(c=="TLE"):
    tle += 1
  elif(c=="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())
s = [0]*n
for i in range(n):
    s[i] = input()
import collections
c = collections.Counter(s)
print(str("AC x ")+str(c["AC"]))
print(str("WA x ")+str(c["WA"]))
print(str("TLE x ")+str(c["TLE"]))
print(str("RE x ")+str(c["RE"]))

Submission status: Accepted

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

a = 0
b = 0
c = 0
d = 0

for i in range(n):
    if s[i] == "AC":
        a += 1
    if s[i] == "WA":
        b += 1
    if s[i] == "TLE":
        c += 1
    if s[i] == "RE":
        d += 1

print("AC x", a)
print("WA x", b)
print("TLE x", c)
print("RE x", d)

Submission status: Accepted

Solution code:
from collections import Counter
import sys
def input():
	return sys.stdin.readline()[:-1]
n = int(input())
c = Counter([input() for _ in range(n)])

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:
N = int(input())
from collections import defaultdict
S = defaultdict(int)
for _ in range(N):
    tmp = input()
    S[tmp] += 1
R = ['AC', 'WA', 'TLE', 'RE']
for r in R:
    ans = r + ' x ' + str(S[r])
    print(ans)

Submission status: Accepted

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

A = 0
W = 0
T = 0
R = 0

for i in range(N):
    if S[i] == "AC":
        A += 1
    elif S[i] == "WA":
        W += 1
    elif S[i] == "TLE":
        T += 1
    elif S[i] == "RE":
        R += 1

print("AC x",A)
print("WA x",W)
print("TLE x",T)
print("RE x",R)

Submission status: Accepted

Solution code:
N=int(input())
S=[input() for _ in range(N)]
a=S.count("AC")
b=S.count("WA")
c=S.count("TLE")
d=S.count("RE")

print("AC","x",a)
print("WA","x",b)
print("TLE","x",c)
print("RE","x",d)

Submission status: Accepted

Solution code:
def resolve():
    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)
resolve()