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

counter=collections.Counter(S)

print('AC x {}'.format(counter['AC']))
print('WA x {}'.format(counter['WA']))
print('TLE x {}'.format(counter['TLE']))
print('RE x {}'.format(counter['RE']))

Submission status: Accepted

Solution code:
def main():
    n  = int(input())
    ans = {'AC':0 , 'WA':0, 'TLE':0, 'RE':0}
    for i in range(n):
        s = input()
        ans[s] += 1
    for key, v in ans.items():
        print(key + ' x ' + str(v))

    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:

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

#print(S)
count=[0,0,0,0]

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(input())
count_ac = 0
count_wa = 0
count_re = 0
count_tle = 0
    
for j in range(N):
    if S[j] == "AC":
        count_ac += 1
    elif S[j] == "WA":
        count_wa += 1
    elif S[j] == "TLE":
        count_tle += 1
    elif S[j] == "RE":
        count_re += 1
print("AC x {0}".format(count_ac))
print("WA x {0}".format(count_wa))
print("TLE x {0}".format(count_tle))
print("RE x {0}".format(count_re))

Submission status: Accepted

Solution code:
N = int(input())
S = [0] * 4
for i in range(N):
    s = input()
    if s == 'AC':
        S[0] += 1
    elif s == 'WA':
        S[1] += 1
    elif s == 'TLE':
        S[2] += 1
    elif s == 'RE':
        S[3] += 1

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

Submission status: Accepted

Solution code:
import math
import sys
#input = sys.stdin.readline
ac,wa,tle,re=0,0,0,0
for _ in range(int(input())):
  verd = input()
  if verd == 'AC':
    ac += 1
  elif verd == 'WA':
    wa += 1
  elif verd == 'RE':
    re += 1
  elif verd == 'TLE':
    tle += 1
print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
  st = str(input())
  if(st == 'AC'):
    ac += 1
  elif(st == 'WA'):
    wa += 1
  elif(st == '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 collections


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

    group = collections.Counter(S)

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


resolve()

Submission status: Accepted

Solution code:
import sys
import math
import numpy as np
import functools
import operator
import collections
import itertools
N=int(input())
S = []
for _ 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:
import sys
import math
# sys.stdin=open('input.txt','r')
# sys.stdout=open('output2.txt','w')
from sys import stdin,stdout
from collections import deque,defaultdict
from math import ceil,floor,inf,sqrt,factorial,gcd,log2
from copy import deepcopy
ii1=lambda:int(stdin.readline().strip())
is1=lambda:stdin.readline().strip()
iia=lambda:list(map(int,stdin.readline().strip().split()))
isa=lambda:stdin.readline().strip().split()
mod=1000000007

n=ii1()
a=0
t=0
w=0
r=0
for i in range(n):
    s=is1()
    if s[0]=='A':
        a+=1
    if s[0]=='T':
        t+=1
    if s[0]=='W':
        w+=1
    if s[0]=='R':
        r+=1
if a>=0:
    print('AC x',a)
if w>=0:
    print('WA x',w)
if t>=0:
    print('TLE x',t)
if r>=0:
    print('RE x',r)

Submission status: Accepted

Solution code:
N = int(input())
ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0} 
for _ 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())
d = dict()
keys = ['AC', "WA", "TLE", "RE"]
for _ in range(N):
  s = input()
  if s in d:
    d[s] += 1
  else:
    d[s] = 1

for key in keys:
  if key in d:
    c = d[key]
  else:
    c = 0
  query = key + ' x ' + str(c)
  print(query)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
#import bisect #bisect.bisect_left(B, a)
from collections import defaultdict #d = defaultdict(int) d[key] += value
from collections import Counter # a = Counter(A).most_common()
#from itertools import accumulate #list(accumulate(A))

N = ii()

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

#cnt = Counter(L).most_common()
cnt = defaultdict(int)
cnt['AC'] = 0
cnt['WA'] = 0
cnt['TLE'] = 0
cnt['TLE'] = 0
for s in L:
    cnt[s] += 1

print('AC x', cnt['AC'])
print('WA x', cnt['WA'])
print('TLE x', cnt['TLE'])
print('RE x', cnt['RE'])

Submission status: Accepted

Solution code:
l = []
for i in range(int(input())):
   l.append(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in l:
    if i == "AC":
        ac+=1
    if i == "TLE":
        tle+=1
    if i == "WA":
        wa+=1
    if i == "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:
#b
n = int(input())
s = [input() for i in range(n)]
ans = [0]*4
for i in s:
    if i == "AC":
        ans[0] += 1
    elif i == "WA":
        ans[1] += 1
    elif i == "TLE":
        ans[2] += 1
    elif i == "RE":
        ans[3] += 1
print("AC x "+str(ans[0]))
print("WA x "+str(ans[1]))
print("TLE x "+str(ans[2]))
print("RE x "+str(ans[3]))

Submission status: Accepted

Solution code:


def resolve():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip())
    ans = {"AC":0, "WA":0, "TLE":0, "RE":0 }

    for _ in range(n):
        s = input().rstrip()
        ans[s] += 1

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



if __name__ == "__main__":
    resolve()


# を理解する。そうすると、明らかに制限時間内に実行が終わらないソースコードを出さなくなる。ちなみに、競プロでは 108108 ～ 109109 回程度のループが回せるといわれている。

Submission status: Accepted

Solution code:
N = int(input())

memo = [0] * 4
for i in range(N):
    str = input()
    if (str == 'AC'):
        memo[0] = memo[0] + 1
    elif (str == 'WA'):
        memo[1] = memo[1] + 1
    elif (str == 'TLE'):
        memo[2] = memo[2] + 1
    else:
        memo[3] = memo[3] + 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
case=int(input())
results=[input() for i in range(case)]

numAC=results.count('AC')
numWA=results.count('WA')
numTLE=results.count('TLE')
numRE=results.count('RE')

print('AC x ' + str(numAC))
print('WA x ' + str(numWA))
print('TLE x ' + str(numTLE))
print('RE x ' + str(numRE))

Submission status: Accepted

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

Submission status: Accepted

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

s_2 = ["AC","WA","TLE","RE"]
for i in range(4):
    print(s_2[i],"x",s[i])

Submission status: Accepted

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

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


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

for i in range(n):
    if s[i]=="AC":
        ac+=1
    if s[i]=="WA":
        wa+=1
    if s[i]=="TLE":
        tle+=1
    if s[i]=="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())
ls = []
for i in range(N):
    res = input()
    ls.append(res)

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = list(input() for _ in range(N))
d = Counter(S)
for key in ['AC', 'WA', 'TLE', 'RE']:
    print(key + ' x ' + str(d[key]))

Submission status: Accepted

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

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

for i in s_list:
	if(i == "AC"):
		ac+=1
	elif(i == "WA"):
		wa += 1
	elif(i == "TLE"):
		tle += 1
	elif(i == "RE"):
		re += 1

print("AC x " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))

Submission status: Accepted

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

import collections
ans = collections.Counter(S)

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 = [input().strip() for _ in range(n)]

ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    if s[i] == "AC":
        ac = ac + 1
    elif s[i] == "WA":
        wa = wa + 1
    elif s[i] == "TLE":
        tle = tle + 1
    elif s[i] == "RE":
        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 = [input() for i in range(n)]
print('AC x %d' % (s.count('AC')))
print('WA x %d' % (s.count('WA')))
print('TLE x %d' % (s.count('TLE')))
print('RE x %d' % (s.count('RE')))

Submission status: Accepted

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

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

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:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys


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


def resolve():
    n = int(input().rstrip())
    s_list = []
    for i in range(n):
        s_list.append(input().rstrip())


    ac_cnt = s_list.count("AC")
    wa_cnt = s_list.count("WA")
    tle_cnt = s_list.count("TLE")
    re_cnt = s_list.count("RE")

    print("AC  x " + str(ac_cnt))
    print("WA  x " + str(wa_cnt))
    print("TLE  x " + str(tle_cnt))
    print("RE  x " + str(re_cnt))



if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
d={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  a=input()
  d[a]=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:
n = int(input())
text = ["AC", "WA", "TLE", "RE"]
count = [0,0,0,0]
for j in range(n):
  line = input()
  for i in range(4):
    if line == text[i]:
      count[i] += 1
      
for i in range(4):
  print(str(text[i]) + " x " + str(count[i]))

Submission status: Accepted

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

n = int(input())

c_ac = 0
c_wa = 0
c_tle = 0
c_re = 0

for i in range(n):
    x = input()
    if x == 'AC':
        c_ac += 1
    elif x == 'WA':
        c_wa += 1
    elif x == '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:
import sys
from io import StringIO
import unittest
import collections

def show(c, str):
    if str in c:
        print(str, 'x', c[str])
    else:
        print(str, 'x', 0)

def resolve():

    S = sys.stdin.readlines()
    S = list(map(lambda x: x.strip(), S))
    N = int(S[0])

    del S[0]

    c = collections.Counter(S)

    show(c, 'AC')
    show(c, 'WA')
    show(c, 'TLE')
    show(c, 'RE')
    
resolve()

Submission status: Accepted

Solution code:
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
  s = input()
  if s == "AC":
    ac += 1
  if s == "WA":
    wa += 1
  if s == "TLE":
    tle += 1
  if s == "RE":
    re += 1
print("AC x %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())
data = ["AC","WA","TLE","RE"]
count = [0]*4
for num in range(N):
  s = input()
  for i in range(4):
    if(data[i]== s):
      count[i] = count[i]+1

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

Submission status: Accepted

Solution code:
def task():
    i=int(input())
    ac=0
    tle=0
    wa=0
    re=0
    while(i):
        i-=1
        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",ac)
    print("WA x",wa)
    print("TLE x",tle)
    print("RE x",re)
def default():
    t=1
    while(t):
        t-=1
        task()
if(__name__=="__main__"):
    default()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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 == "WA":
        wa +=1
    elif a == "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, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from functools import reduce
from bisect import bisect_left, insort_left
from heapq import heapify, heappush, heappop

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())
MAP = lambda: map(int, INPUT().split())
S_MAP = lambda: map(str, INPUT().split())
LIST = lambda: list(map(int, INPUT().split()))
S_LIST = lambda: list(map(str, INPUT().split()))
ZIP = lambda: zip(*(MAP() for _ in range(n)))

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


def main():
    N = INT()
    S = [INPUT() for _ in range(N)]

    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__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
d = {'AC':0,'WA':1, 'TLE':2, 'RE':3}
a = ['AC x', 'WA x', 'TLE x', 'RE x']
ans_list = [0]*4
for _ in range(n):
    s = input()
    ans_list[d[s]]+=1
[print(a[i],ans_list[i]) for i in range(4)]

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for _ in range(n)]
ac = s.count('AC')
print('AC x '+str(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)]
j = ['AC', 'WA', 'TLE', 'RE']
l = [0]*len(j)
for i in s:
    for m in range(len(j)):
        if i == j[m]:
            l[m] += 1
            
for i in range(len(j)):
    print(j[i] + ' x ' + str(l[i]))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for n 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:
import math
import bisect
import copy
#import time

#map(int,input().split())
#int(x) for x in input().split()
#for _ in range(int(input()))
l=[]
for i in range(int(input())):
	l.append(input())
d={}
d['AC']=0

d['WA']=0
d['TLE']=0
d['RE']=0
for i in range(len(l)):
	d[l[i]]+=1
for u,v in d.items():
	print(u,'x',v)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
s=[]
for i in range(n):
    a=input()
    s.append(a)
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
    else:
        re+=1

print('AC x '+str(ac))
print('WA x '+str(wa))
print('TLE x '+str(tle))
print('RE x '+str(re))

Submission status: Accepted

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

Ans = [0] * 4

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

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

Submission status: Accepted

Solution code:
# vim: fileencoding=utf-8


def main():
    n = int(input())
    string_list = [input() for i in range(n)]
    c1, c2, c3, c4 = 0, 0, 0, 0
    for s in string_list:
        if s == "AC":
            c1 += 1
        elif s == "WA":
            c2 += 1
        elif s == "TLE":
            c3 += 1
        elif s == "RE":
            c4 += 1
    print(f"AC x {c1}")
    print(f"WA x {c2}")
    print(f"TLE x {c3}")
    print(f"RE x {c4}")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
x = int(input())

AC=0
WA=0
TLE=0
RE=0
for i in range(x):
    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:
n = int(input())
S = {}
for _ in range(n):
    k = input()
    if k not in S: S[k] = 0
    S[k] += 1

# print(S)

for k in ['AC','WA','TLE','RE']:
    # print(k)
    if k not in S: print(k, 'x', 0)
    else: print(k, 'x', S[k])

Submission status: Accepted

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

Submission status: Accepted

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

    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
cnt = [0, 0, 0, 0]
for i in range(n):
    s = input()
    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 {}".format(cnt[0]))
print("WA x {}".format(cnt[1]))
print("TLE x {}".format(cnt[2]))
print("RE x {}".format(cnt[3]))

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

Submission status: Accepted

Solution code:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n = i()
s = [s() for _ in range(n)]

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

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for _ 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
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:
list=[]
for i in range(int(input())):
    list.append(input())
AC,WA,TLE,RE=0,0,0,0
for a in list:
    if a=="AC":
        AC+=1
    elif a=="WA":
        WA+=1
    elif a=="TLE":
        TLE+=1
    elif a=="RE":
        RE+=1
print("AC","x",AC)
print("WA","x",WA)
print("TLE","x",TLE)
print("RE","x",RE)

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

n = int(readline())
s = [readline().decode().rstrip() for _ in range(n)]
"".join(s)
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:
import itertools
import decimal
import math
import collections
import sys
input = sys.stdin.readline


# S=(input())
# N=int(input())
# N,K=map(int,input().split())
# ListA=list(map(int,input().split()))
# ListA.sort()#reverse=True)



def resolve():
    N=int(input())
    AC=0
    WA=0
    TLE=0
    RE=0
    for i in range(N):
        S=input().strip()
        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))
    


resolve()

Submission status: Accepted

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

for i in range(N):
  S[input()] += 1
  
for key in S.keys():
  print(key + " x " + str(S[key]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
judge =["AC","WA","TLE","RE"]
C = [0,0,0,0]

N= int(input())
for i in range(N):
    si = input()
    if si == judge[0]:
        C[0]+=1
    elif si == judge[1]:
        C[1]+=1
    elif si == judge[2]:
        C[2]+=1
    elif si == judge[3]:
        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:
N = int(input())
results = [0,0,0,0]
for i in range(N):
    result = input()
    if result[0]=="A":
        results[0]+=1
    elif result[0]=="W":
        results[1]+=1
    elif result[0]=="T":
        results[2]+=1
    elif result[0]=="R":
        results[3]+=1
print("AC x ",results[0],"\n","WA x ",results[1],"\n","TLE x ",results[2],"\n","RE x ",results[3])

Submission status: Accepted

Solution code:
N = int(input())
x = [input() for i in range(N)]
AC = 0
WA = 0
TLE = 0
RE = 0
j = 0
while j < N :
  if x[j] == "AC":
    AC += 1
  if x[j] == "WA":
    WA += 1
  if x[j] == "TLE":
    TLE += 1
  if x[j] == "RE":
    RE += 1
  j += 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 datetime
from decimal import Decimal, ROUND_DOWN
import heapq
from fractions import gcd
from functools import reduce
from collections import deque
# from math import factorial
import itertools
import collections
import math
import sys
sys.setrecursionlimit(2000000)
# import statistics
# import numpy as np
# n = int(input())
# n, m, p = list(map(int, input().split()))
# a = list(map(int, input().split()))
#
#  abc = [int(input()) for i in range(5)]
n = int(input())
#n, k = list(map(int, input().split()))
#A = list(map(int, input().split()))
# a = list(map(int, input().split()))
# data = [list(map(int, input().split())) for i in range(n)]
# q = int(input())
#s = list(map(int, input().split()))
# b = list(map(int, input().split()))
# ab_sorted = sorted(ab, key=lambda x: x[0])
#ab = [list(map(int, input().split())) for i in range(n)]
# print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10)))
s = []
for i in range(n):
    s.append(input())
s_count = collections.Counter(s)
#s_list = list(s_count.items())

if 'AC' in s_count:
    print('AC x '+str(s_count['AC']))
else:
    print('AC x 0')

if 'WA' in s_count:
    print('WA x '+str(s_count['WA']))
else:
    print('WA x 0')

if 'TLE' in s_count:
    print('TLE x '+str(s_count['TLE']))
else:
    print('TLE x 0')

if 'RE' in s_count:
    print('RE x '+str(s_count['RE']))
else:
    print('RE x 0')

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for i in range(n)]
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
    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())
judge = ["AC", "WA" , "TLE", "RE"]
res = [0, 0, 0, 0]
for i in range(N):
  s = input()
  if s == judge[0]:
    res[0] += 1
  elif s == judge[1]:
    res[1] += 1
  elif s == judge[2]:
    res[2] += 1
  elif s == judge[3]:
    res[3] += 1
print("AC x {}".format(res[0]))
print("WA x {}".format(res[1]))
print("TLE x {}".format(res[2]))
print("RE x {}".format(res[3]))

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:
def main():
    n = int(input())
    s = []
    for i in range(n):
        s.append(input())

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

    c0 = res['AC']
    c1 = res['WA']
    c2 = res['TLE']
    c3 = res['RE']

    print('AC x {}'.format(c0))
    print('WA x {}'.format(c1))
    print('TLE x {}'.format(c2))
    print('RE x {}'.format(c3))
    

if __name__ == '__main__':
    main()