Problem:


Score : 200 points

Problem Statement

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

The problem has N test cases.

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

See the Output section for the output format.

Constraints

1 \leq N \leq 10^5

S_i is AC, WA, TLE, or RE.

Input

Input is given from Standard Input in the following format:

N
S_1
\vdots
S_N

Output

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

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

Sample Input 1

6
AC
TLE
AC
AC
WA
TLE

Sample Output 1

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

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

Sample Input 2

10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Sample Output 2

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



Sample input:
6
AC
TLE
AC
AC
WA
TLE


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

Submission status: Accepted

Solution code:
N= int(input())
s = [input() for i in range(N)] 
C = [0,0,0,0]
for i in range(N):
    if s[i] == "AC":
        C[0] = C[0] + 1
    elif s[i] == "WA":
        C[1] = C[1] + 1
    elif s[i] == "TLE":
        C[2] = C[2] + 1
    else:
        C[3] = 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())
res=[]
for i in range(n):
    res.append(input())

from collections import defaultdict
cnt=defaultdict(int)
cnt["AC"]=0
cnt["TLE"]=0
cnt["WA"]=0
cnt["RE"]=0
for i in res:
    cnt[i]+=1
for i in ["AC","WA","TLE","RE"]:
    print(i,"x",cnt[i])

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import numpy as np
import collections

def solve(N: int, S: "List[str]"):
    ans = collections.Counter(S)
    for a in ['AC', 'WA', 'TLE', 'RE']:
        print("{} x {}".format(a, ans[a]))
    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:
N = int(input())
S = []
for i in range(N):
    S.append(input())
print("AC x "+str(S.count("AC")))
print("WA x "+str(S.count("WA")))
print("TLE x "+str(S.count("TLE")))
print("RE x "+str(S.count("RE")))

Submission status: Accepted

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

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

Submission status: Accepted

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


print("AC x "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

cnt_ac = 0
cnt_wa = 0
cnt_tle = 0
cnt_re = 0

for i in range(n):
  s = str(input())
  if s == 'AC':
    cnt_ac += 1
  elif s == 'WA':
    cnt_wa += 1
  elif s == 'TLE':
    cnt_tle += 1
  elif s == 'RE':
    cnt_re += 1
    
print('AC x {}'.format(cnt_ac))
print('WA x {}'.format(cnt_wa))
print('TLE x {}'.format(cnt_tle))
print('RE x {}'.format(cnt_re))

Submission status: Accepted

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

N = int(input())


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

print(S)
"""

ans = [0]*4

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

  if ( S == "AC" ):
    ans[0] += 1
  elif ( S == "WA" ):
    ans[1] += 1
  elif ( S == "TLE" ):
    ans[2] += 1
  else:
    ans[3] += 1

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

Submission status: Accepted

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

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

for i, j in zip(data.keys(), data.values()):
    print(i + " x " + str(j))

Submission status: Accepted

Solution code:
from collections import Counter


def A(x):
  return 1000 - x % 1000 if x % 1000 != 0 else 0


def B(n, ss):
  keys_values = Counter(ss)
  orders = ['AC', 'WA', 'TLE', 'RE']
  for order in orders:
    if order in keys_values:
      print("{} x {}".format(order, keys_values[order]))
    else:
      print("{} x {}".format(order, 0))


def C(n, m, k, a, b):
  pass


def main():
  n = int(input())
  ss = []
  for i in range(n):
    ss.append(input())
  B(n, ss)


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):
  S=input()
  if(S=='AC'):
    AC+=1
  elif(S=='WA'):
    WA+=1
  elif(S=='TLE'):
    TLE+=1
  elif(S=='RE'):
    RE+=1

print("AC x "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

Submission status: Accepted

Solution code:
N=int(input())

ans=dict()

results = ('AC','WA','TLE','RE')
for r in results:
    ans[r]=0

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

for r in results:
    # print(r,ans[r])
    p = "{0} x {1}".format(r,str(ans[r]))
    print(p)

Submission status: Accepted

Solution code:
n = int(input())
judge = {}
judge['AC'] = 0
judge['WA'] = 0
judge['TLE'] = 0
judge['RE'] = 0

for i in range(n):
    s = input()
    if s == 'AC':
        judge['AC'] += 1
    if s == 'WA':
        judge['WA'] += 1
    if s == 'TLE':
        judge['TLE'] += 1
    if s == 'RE':
        judge['RE'] += 1
for key, value in judge.items():
    print("{} x {}".format(key, value))

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
l = []
for _ in range(n):
	l.append(input().rstrip())
ct = Counter(l)

As = ["AC","WA","TLE","RE"]
for A in As:
	print("{} x {}".format(A, ct[A]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
ac, wa, tle, re = 0, 0, 0, 0
i = 0
while i < n:
    c = input()
    if c == "AC":
        ac += 1
    elif c == "WA":
        wa += 1
    elif c == "TLE":
        tle += 1
    elif c == "RE":
        re += 1
    i += 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] * 4
for i in range(N):
    s = str(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 ' + str(S[0]))
print('WA x ' + str(S[1]))
print('TLE x ' + str(S[2]))
print('RE x ' + str(S[3]))

Submission status: Accepted

Solution code:
from collections import defaultdict
n = int(input())
d=defaultdict(int)
for _ in range(n):
    s=input()
    d[s]+=1

moji=['AC', 'WA', 'TLE', 'RE' ]
for i in range(4):
    print(moji[i],'x',d[moji[i]])

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
num = int(input())
ac_num = 0
wa_num = 0
tle_num = 0
re_num = 0
for i in range(num):
    s = input()
    if(s=='AC'):
        ac_num += 1
    elif(s=='WA'):
        wa_num += 1
    elif(s=='TLE'):
        tle_num += 1
    else:
        re_num += 1

print('AC x '+str(ac_num))
print('WA x '+str(wa_num))
print('TLE x '+str(tle_num))
print('RE x '+str(re_num))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for i in range(0, N):
        res = input()
        if (res == 'AC'):
            ac += 1
        if (res == 'WA'):
            wa += 1
        if (res == 'TLE'):
            tle += 1
        if (res == 'RE'):
            re += 1
    print(f"AC x {ac}")
    print(f"WA x {wa}")
    print(f"TLE x {tle}")
    print(f"RE x {re}")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
t=int(input())
d=dict()
d["AC"]=0
d["WA"]=0
d["TLE"]=0
d["RE"]=0
for i in range(t):
  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:
AC = 0
WA = 0
TLE = 0
RE = 0

N = int(input())
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', AC)
print('WA', 'x', WA)
print('TLE', 'x', TLE)
print('RE', 'x', RE)

Submission status: Accepted

Solution code:
n=int(input())
a=[input() for i in range(n)]
cnt=[0]*4
jud=['AC x','WA x','TLE x','RE x']
for i in a:
    if i=='AC':
        cnt[0]+=1
    if i=='WA':
        cnt[1]+=1
    if i=='TLE':
        cnt[2]+=1
    if i=='RE':
        cnt[3]+=1
for i in range(4):
    print(jud[i],cnt[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
d={}
d["AC"]=0
d["WA"]=0
d["TLE"]=0
d["RE"]=0
n=int(input())
for i in range(n):
    s=str(input())
    d[s]+=1
#print(d)
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())
S = list(input() for _ 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:
import collections
import itertools
N = int(input())
S = [input().split() for i in range(N)]
S1 = list(itertools.chain.from_iterable(S))
cnt = collections.Counter(S1)

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
n=int(input())
c_0=0
c_1=0
c_2=0
c_3=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
    else:
        c_3+=1
print("AC x "+str(c_0))
print("WA x "+str(c_1))
print("TLE x "+str(c_2))
print("RE x "+str(c_3))

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = [input() for i in range(N)]
C = Counter(S)
C0 = C["AC"]
C1 = C["WA"]
C2 = C["TLE"]
C3 = C["RE"]
print(f"AC x {C0}")
print(f"WA x {C1}")
print(f"TLE x {C2}")
print(f"RE x {C3}")

Submission status: Accepted

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

a=s.count("AC")
w=s.count("WA")
t=s.count("TLE")
r=s.count("RE")

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())
L=[]
for i in range(N):
    L.append(input())
C=[]
W=['AC', 'WA', 'TLE', 'RE' ]
Q=[0,0,0,0]
for i in range(N):
    for j in range(4):
        if L[i]==W[j]:
            Q[j]=Q[j]+1
            break
print('AC x '+str(Q[0]))
print('WA x '+str(Q[1]))
print('TLE x '+str(Q[2]))
print('RE x '+str(Q[3]))

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())

l = [0]*4
w = ["AC","WA","TLE","RE"]

for i in range(n):
    s = input()
    if s == "AC":
        l[0] += 1
    elif s == "WA":
        l[1] += 1
    elif s == "TLE":
        l[2] += 1
    else:
        l[3] +=1
        
for i in range(4):
    print(w[i] + " x " + str(l[i]))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
#import math
num = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0


for i in range(num):
    word = input()
    if word == "AC":
        AC = AC + 1
    elif word == "WA":
        WA = WA + 1
    elif word == "TLE":
        TLE = TLE + 1
    else:
        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 = []

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

Submission status: Accepted

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

for i in range(0,n):
  a = input()
  if (a == 'AC'): ac+=1
  if (a == 'WA'): wa+=1
  if (a == 'TLE'): tle+=1
  if (a == 'RE'): re+=1

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

Submission status: Accepted

Solution code:
n = int(input())
li=[]
for z in range(n):
    li.append(input())
acc = li.count('AC')
wrg = li.count('WA')
time = li.count('TLE')
run_time = li.count('RE')
print(f"AC x {acc}")
print(f"WA x {wrg}")
print(f"TLE x {time}")
print(f"RE x {run_time}")

Submission status: Accepted

Solution code:
'''
.append(要素) リストに要素を追加
.extend(リスト) リストを連結する
.insert(場所,要素) 指定した場所に要素追加
del 配列名[場所]
-1で末尾で末尾から一つ前
sort()
sorted(reverse=true)
配列の初期化
配列名=[a]*n+[b]*m
Decimal()
'''

from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math
from functools import reduce
from operator import mul
from collections import Counter
import itertools
import fractions
import sys
ac = 0
wa = 0
tle = 0
re = 0
num = int(stdin.readline().rstrip())
for el in range(num):
    st = stdin.readline().rstrip()
    if st == 'AC':
        ac += 1
    if st == 'WA':
        wa += 1
    if st == 'TLE':
        tle += 1
    if 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())
d = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
  s = input()
  d[s] += 1
for i in ['AC','WA','TLE','RE']:
  print(i,'x',d[i])

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

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

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:
from math import *
from copy import *
from string import *				# alpha = ascii_lowercase
from random import *
from sys import stdin,stdout
from sys import maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *
from collections import Counter		# d = dict(Counter(l))
import math
import math
import time
from queue import Queue
# PradeepGhosh_2017076

def seive(n):
	l=[True]
	l=l*(n+1)
	for i in range(2,int(sqrt(n))+1):
		if(l[i]==True):
			val=i*i
			while(val<len(l)):
				l[val]=False
				val+=i
	prime=[]
	for i in range(2,len(l)):
		if(l[i]==True):
			prime.append(i)
	return prime

def dp(l,i,n,val,ans):
	if(i>=n or val<0):
		return 1000000
	elif(val==0):
		return 0
	else:
		if(ans[i]==1000000):
			ans[i]=min(min(1+dp(l,i+1,n,val-l[i],ans),1+dp(l,i,n,val-l[i],ans)),dp(l,i+1,n,val,ans))
		return ans[i]
from queue import Queue
def factors(n):
	l=[]
	for i in range(1,int(sqrt(n))+1):
		if(n%i==0):
			if(n//i==i):
				l.append(i)
			else:
				l.append(i)
				l.append(n//i)
	return l
def check1(s,v,x):
	while(True):
		if(v not in s):
			return v
		else:
			v-=1
def check2(s,v,x):
	while(True):
		if(v not in s):
			return v
		else:
			v+=1

def up(n):
	j=n-1
	while(j>0):
		if(n%j==0):
			break
		j-=1
	return j		
def fac(n):
	c=1
	i=1
	while(i<=n):
		c*=i
		i+=1
	return c
def check_happy(n):
	ss=set()
	print(n)
	while(n!=1):
		val=n
		s=0
		print(val)
		while(val!=0):
			s+=(val%10)**2
			val=val//10
		print(val)
		print("hi")
		if(val in ss):
			return False
		else:
			n=val
			ss.add(n)
	return True
if __name__ == '__main__':
	t=int(input())
	ac=0
	wa=0
	tle=0
	re=0
	for i in range(t):
		s=str(input())
		if(s=="AC"):
			ac+=1
		elif(s=="WA"):
			wa+=1
		elif(s=="TLE"):
			tle+=1
		elif(s=="RE"):
			re+=1
	s1="AC"+" x "+str(ac)
	s2="WA"+" x "+str(wa)
	s3="TLE"+" x "+str(tle)
	s4="RE"+" x "+str(re)
	print(s1)
	print(s2)
	print(s3)
	print(s4)

Submission status: Accepted

Solution code:
def main():
    num = int(input())
    inputlist = [input() for i in range(num)]
    print("AC x ", inputlist.count("AC"))
    print("WA x ", inputlist.count("WA"))
    print("TLE x ", inputlist.count("TLE"))
    print("RE x ", inputlist.count("RE"))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
t=int(input())
dic={"AC":0,"WA":0,"TLE":0,"RE":0}
while(t>0):
    s=input()
    if(s=="AC"):
        dic["AC"]+=1
    elif(s=="WA"):
        dic["WA"]+=1
    elif(s=="TLE"):
        dic["TLE"]+=1
    elif(s=="RE"):
        dic["RE"]+=1
    t-=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())
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:

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
number = int(input())

AC = 0
TLE = 0
WA = 0
RE = 0
chara = []
for i in range(0,number):
    a = input()
    if(a == 'AC'):
        AC = AC + 1
    elif(a == 'TLE'):
        TLE = TLE + 1
    elif (a == 'WA'):
        WA = WA + 1
    elif (a == '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())

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

for i in range(n):
    s = str(input())
    if s == 'AC':
        ac += 1
    elif s == 'WA':
        wa += 1
    elif s == 'TLE':
        tle += 1
    else:
        re += 1

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

for key in ['AC', 'WA', 'TLE', 'RE']:
  print('{} x {}'.format(key, d[key]))

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:

from collections import Counter

n = int(input())

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

s = Counter(s)

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

Submission status: Accepted

Solution code:
n = int(input())
s_list = []
ans_list = [0, 0, 0, 0]

for i in range(n):
    s_list.append(input())

for i in range(n):
    if s_list[i] == "AC":
        ans_list[0] += 1
    elif s_list[i] == "WA":
        ans_list[1] += 1
    elif s_list[i] == "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:
N = int(input())
s = [input() for i in range(N)]

AC = s.count('AC')
WA = s.count('WA')
TLE = s.count('TLE')
RE  = s.count('RE')

print('AC x ' + str(AC))
print('WA x ' + str(WA))
print('TLE x ' + str(TLE))
print('RE x ' + str(RE))

Submission status: Accepted

Solution code:
n=int(input())
a,b,c,d=0,0,0,0
l=[input() for _ in range(n)]
for i in range(n):
    if l[i]=='AC':a+=1
    elif l[i]=='WA':b+=1
    elif l[i]=='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:
# B

from collections import Counter

n = int(input())
s_c = Counter([input() for x in range(n)])

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

Submission status: Accepted

Solution code:
n = int(input())
s = [""]*n
for i in range(n):
  s[i] = input()
ac,wa,tle,re = 0,0,0,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 %d\nWA x %d\nTLE x %d\nRE x %d" % (ac,wa,tle,re))

Submission status: Accepted

Solution code:
N = int(input())
k = []
for i in range(N):
  k.append(input())
a = 0
b = 0 
c = 0
d = 0
for i in k:
  if i =='AC':
    a += 1
  elif i =='WA':
    b += 1
  elif i =='TLE':
    c += 1
  elif 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:
import sys


def resolve():
    readline = sys.stdin.readline    # 1行だけ文字列にする

    N = int(readline())
    ac, wa, tle, re = 0, 0, 0, 0
    for _ in range(N):
        judge = readline().strip()
        if judge == 'AC':
            ac += 1
        elif judge == 'WA':
            wa += 1
        elif judge == 'TLE':
            tle += 1
        elif judge == 'RE':
            re += 1
    print(f'AC x {ac}', f'WA x {wa}', f'TLE x {tle}', f'RE x {re}', sep='\n')


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

c = [0,0,0,0]

for i in range(n):
    s = str(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())
s=[input() for i in range(n)]

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

Submission status: Accepted

Solution code:
n = int(input())

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:
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:
a = int(input())
i = 0
o = 0
p = 0
s = 0
l = 0
while i < a :
    b = input()
    if b == "AC" :
        o = o + 1
    if b == "WA" :
        p = p + 1
    if b == "TLE" :
        s = s + 1
    if b == "RE" :
        l = l + 1
    i = i + 1
print("AC" , "x" , o)
print("WA" , "x" , p)
print("TLE" , "x" , s)
print("RE" , "x" , l)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
A = 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
  else:
    R +=1
for judge, c in zip(["AC","WA","TLE","RE"],[A,W,T,R]):
  print(judge+" x "+ str(c))

Submission status: Accepted

Solution code:
count = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(int(input())):
  count[input()] += 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:
import collections
from typing import Counter

if __name__ == "__main__":
    N = int(input())
    S = []
    for _ in range(N):
        S.append(input())
    counter = dict(collections.Counter(S))
    try:
        print(f"AC x {counter['AC']}")
    except:
        print(f"AC x {0}")
    try:
        print(f"WA x {counter['WA']}")
    except:
        print(f"WA x {0}")

    try:
        print(f"TLE x {counter['TLE']}")
    except:
        print(f"TLE x {0}")

    try:
        print(f"RE x {counter['RE']}")
    except:
        print(f"RE x {0}")

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

Submission status: Accepted

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

n=int(input().rstrip())
d={"AC":0,"WA":1,"TLE":2,"RE":3}
cnt=[0]*4
for _ in range(n):
    s=input().rstrip()
    cnt[d[s]]+=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:
n=int(input())
c1,c2,c3,c4=0,0,0,0
for i in range(n):
  s=input()
  if(s=='AC'):
    c1+=1
  elif(s=='WA'):
    c2+=1
  elif(s=='TLE'):
    c3+=1
  else:
    c4+=1
print('AC x'+' '+str(c1))
print('WA x'+' '+str(c2))
print('TLE x'+' '+str(c3))
print('RE x'+' '+str(c4))

Submission status: Accepted

Solution code:
N=int(input())
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
    result=input()
    if result=="AC":
        AC+=1
    elif result == "WA":
        WA+=1
    elif result == "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:
import sys
input = sys.stdin.readline
from collections import Counter
N=int(input())
S=Counter([input().strip() for i in range(N)])

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

Submission status: Accepted

Solution code:
s = [input() for i in range(1)] 
s0 = int(s[0])
t = [input() for i in range(s0)]
ac_count=0
wa_count=0
tle_count=0
re_count=0

for j in range(s0):
    s1 = t[j]
    if s1 == "AC":
        ac_count+=1
    if s1 == "WA":
        wa_count+=1
    if s1 == "TLE":
        tle_count+=1
    if s1 == "RE":
        re_count+=1
print("AC x ",ac_count)
print("WA x ",wa_count)
print("TLE x ",tle_count)
print("RE x ",re_count)

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 S:
  if i == "AC":
    AC += 1
  if i == "WA":
    WA += 1
  if i == "TLE":
    TLE += 1  
  if i == "RE":
    RE += 1
    
print("AC","x",AC)
print("WA","x",WA)
print("TLE","x",TLE)
print("RE","x",RE)