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

c = collections.Counter(S_list)

C_0 = c['AC']
C_1 = c['WA']
C_2 = c['TLE']
C_3 = c['RE']

print('AC x {}'.format(C_0))
print('WA x {}'.format(C_1))
print('TLE x {}'.format(C_2))
print('RE x {}'.format(C_3))

Submission status: Accepted

Solution code:
N = int(input())
data = [input() for x in range(N)]

keys_list = ['AC','WA','TLE','RE']
check_list = {'AC':0,'WA':0,'TLE':0,'RE':0}

for x in data:
    check_list[x] = check_list[x] + 1

for x in keys_list:
    print('{} x {}'.format(x,check_list[x]))

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in S:
    count[i] += 1

ans = 'AC x ' + str(count['AC']) + '\n' + 'WA x ' + str(count['WA']) + '\n' + 'TLE x ' + str(count['TLE']) + '\n' + 'RE x ' + str(count['RE'])

print(ans)

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",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for _ in range(n)]
ans = {}
for i in range(n):
    if s[i] in ans.keys():
        ans[s[i]] += 1
    else:
        ans[s[i]] = 1


if 'AC' in ans.keys():
    print('AC x %d' % ans['AC'])
else:
    print('AC x %d' % 0)

if 'WA' in ans.keys():
    print('WA x %d' % ans['WA'])
else:
    print('WA x %d' % 0)

if 'TLE' in ans.keys():
    print('TLE x %d' % ans['TLE'])
else:
    print('TLE x %d' % 0)

if 'RE' in ans.keys():
    print('RE x %d' % ans['RE'])
else:
    print('RE x %d' % 0)

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit, stdout
#setrecursionlimit(1000000) #use "python" instead of "pypy" to avoid MLE
#from collections import deque
#from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
#from heapq import heapify, heappop, heappush, heapreplace, heappushpop
def ii(): return int(stdin.readline())
def fi(): return float(stdin.readline())
def mi(): return map(int, stdin.readline().split())
def fmi(): return map(float, stdin.readline().split())
def li(): return list(mi())
def si(): return stdin.readline().rstrip()
def lsi(): return list(si())
#mod=1000000007
res=['YES', 'NO']





test_case=1
while test_case:
    test_case-=1

    a=w=t=r=0


    for _ in range(ii()):
        x=lsi()
        if x[0]=='A':
            a+=1
        elif x[0]=='W':
            w+=1
        elif x[0]=='T':
            t+=1
        else:
            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 = []
for _ in range(N):
    S.append(input())

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

for i in S:
    if i in dic:
        dic[i] += 1
    else:
        dic[i] = 1

for key, value in dic.items():
    print("{} x {}".format(key, value))

Submission status: Accepted

Solution code:
#B
N=int(input())
ac=0
wa=0
tle=0
re=0
for _ 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"+" "+str(ac))
print('WA'+" "+"x"+" "+str(wa))
print('TLE'+" "+"x"+" "+str(tle))
print('RE'+" "+"x"+" "+str(re))

Submission status: Accepted

Solution code:
#!python3

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


def main():
    l = ["AC", "WA", "TLE", "RE"]
    d = {x: 0 for x in l}
    for s in S:
        d[s] += 1
    for x in l:
        ans = "{} x {}".format(x, d[x])
        print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(f'AC x {AC_cnt}')
print(f'WA x {WA_cnt}')
print(f'TLE x {TLE_cnt}')
print(f'RE x {RE_cnt}')

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
    t = S()
    if t == 'AC':
        ac += 1
    elif t == 'WA':
        wa += 1
    elif t == 'TLE':
        tle += 1
    elif t == '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)]
ac=0
wa=0
tle=0
re=0
for i in S:
  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())
cnt1 = 0
cnt2 = 0
cnt3 = 0
cnt4 = 0
for i in range(N):
  s = input()
  if s == 'AC':
    cnt1 += 1
  elif s == 'WA':
    cnt2 += 1
  elif s == 'TLE':
    cnt3 += 1
  elif s == 'RE':
    cnt4 += 1
print("AC x",cnt1)
print("WA x",cnt2)
print("TLE x",cnt3)
print("RE x",cnt4)

Submission status: Accepted

Solution code:
N = int(input()) #1行目のNを取得する
s = [input() for i in range(N)] 
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0

for i in range(len(s)):
    if s[i] == 'AC':
        count_AC += 1
    elif s[i] == "WA":
        count_WA += 1
    elif s[i] == "TLE":
        count_TLE += 1
    else:
        count_RE += 1
print("AC x "+str(count_AC))
print("WA x "+str(count_WA))
print("TLE x "+str(count_TLE))
print("RE x "+str(count_RE))

Submission status: Accepted

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

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

Submission status: Accepted

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

for x in ['AC','WA','TLE','RE']:
  print(x+' x '+str(s.count(x)))

Submission status: Accepted

Solution code:
n = int(input())

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

for i in range(n):
  s = input()
  if s == "AC":
    a += 1
  elif s == "WA":
    b += 1
  elif s == "TLE":
    c += 1
  elif s == "RE":
    d += 1
    
print("AC x " + str(a))
print("WA x " + str(b))
print("TLE x " + str(c))
print("RE x " + str(d))

Submission status: Accepted

Solution code:
N = int(input())
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0
for _ in range(N):
  x = input()
  if x == 'AC':
    count_AC += 1
  elif x == 'WA':
    count_WA += 1
  elif x == 'TLE':
    count_TLE += 1
  else:
    count_RE += 1
print('AC x {}'.format(count_AC))
print('WA x {}'.format(count_WA))
print('TLE x {}'.format(count_TLE))
print('RE x {}'.format(count_RE))

Submission status: Accepted

Solution code:
import collections

def main():
    n = int(input())
    s_list = []
    for _ in range(n):
        s_list.append(input())
    c = collections.Counter(s_list)

    for result in ["AC", "WA", "TLE", "RE"]:
        print("{0} x {1}".format(result, c[result]))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
result = []
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    result.append(input())
    if result[i] == "AC":
        AC += 1
    elif result[i] == "WA":
        WA += 1
    elif result[i] == "TLE":
        TLE += 1
    elif result[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:
import sys
#DEBUG = True
DEBUG = False
if DEBUG:
    f=open("202007_1st/B_input.txt")
else:
    f=sys.stdin
N=int(f.readline())
V=[f.readline().strip() for _ in range(N)]
R=[0,0,0,0]
for _ in range(N):
    if V[_]=='AC':
        R[0]+=1
    elif V[_]=='WA':
        R[1]+=1
    elif V[_]=='TLE':
        R[2]+=1
    elif V[_]=='RE':
        R[3]+=1
    else:
        pass
print("AC x {0}".format(R[0]))
print("WA x {0}".format(R[1]))
print("TLE x {0}".format(R[2]))
print("RE x {0}".format(R[3]))
f.close()

Submission status: Accepted

Solution code:
import collections

N = int(input())
S = [input() for i in range(N)]
C = collections.Counter(S)

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:
#B - Judge Status Summary
N=int(input())
S={}
S['AC']=0
S['WA']=0
S['TLE']=0
S['RE']=0

for i in range(N):
    s=input()
    if s in S:
        S[s]+=1
    else:
        S[s]=1
 
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:
dict = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
n = int(input())
for i in range(n):
  dict[input()] += 1
print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(dict['AC'],dict['WA'],dict['TLE'],dict['RE']))

Submission status: Accepted

Solution code:
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0

for i in range(0, N):
    inp = input()
    if (inp=='AC'):
        AC = AC + 1
        continue
   
    if (inp=='WA'):
        WA = WA + 1
        continue
    
    if (inp=='TLE'):
        TLE = TLE + 1
        continue
        
    RE = RE + 1
    
print(f'AC x {AC}')
print(f'WA x {WA}')
print(f'TLE x {TLE}')
print(f'RE x {RE}')

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
judge = ["AC", "WA", "TLE", "RE"]

N = (int)(input())
count = [0,0,0,0]

for i in range(N):
    inp = input()
    if inp in judge:
        count[judge.index(inp)] += 1
    else:
        continue
        
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=[input() for i in range(n)]
x=["AC","WA","TLE","RE"]

for i in x:
    print("{} x ".format(i)+str(s.count(i)))

Submission status: Accepted

Solution code:
n=int(input())
word_list = ['AC','WA','TLE','RE']
A = 0
W = 0
T = 0
R = 0

for i in range(n):
    s = input()
    if s == 'AC':
        A = A + 1
    elif s == 'WA':
        W = W + 1
    elif s == 'TLE':
        T = T + 1
    else:
        R = R + 1
Ans_list = [A,W,T,R]
for i in range(4):
    print(str(word_list[i])+ ' x '+ str(Ans_list[i]))

Submission status: Accepted

Solution code:
N = int(input())
L = []
for i in range(N):
  L.append(input())
a = 0
b = 0
c = 0
d = 0
for i in L:
  if i == 'AC':
    a += 1
  elif i == 'WA':
    b += 1
  elif i == 'TLE':
    c += 1
  elif i == 'RE':
    d += 1
print("AC x {}".format(a))
print("WA x {}".format(b))
print("TLE x {}".format(c))
print("RE x {}".format(d))

Submission status: Accepted

Solution code:
def main():
  num = int(input())
  result = []
  for i in range(num):
    result.append(input())
  print(f'AC x {result.count("AC")}')
  print(f'WA x {result.count("WA")}')
  print(f'TLE x {result.count("TLE")}')
  print(f'RE x {result.count("RE")}')
  return

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(count):
    word = input()
    if word =="AC":
        ac += 1
    elif word =="WA":
        wa += 1
    elif word =="TLE":
        tle += 1
    elif word =="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())
str_list = [input() for _ in range(n)]
print('AC x',str_list.count('AC'))
print('WA x',str_list.count('WA'))
print('TLE x',str_list.count('TLE'))
print('RE x',str_list.count('RE'))

Submission status: Accepted

Solution code:
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 " + 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 = []
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for _ in range(N):
    S.append(input()) 
   
for i in range(len(S)):
  if S[i] == "AC":
    c0 += 1
  if S[i] == "WA":
    c1 += 1
  if S[i] =="TLE":
    c2 += 1
  if S[i] == "RE":
    c3 +=1
    
print("AC x ", c0)
print("WA x " ,c1)
print("TLE x ", c2)
print("RE x ", c3)

Submission status: Accepted

Solution code:
N = int(input())

AC_count = 0
WA_count = 0
TLE_count = 0
RE_count = 0

for i in range(N):
  S = input()
  if S == 'AC':
    AC_count = AC_count + 1
  elif S == 'WA':
    WA_count = WA_count + 1
  elif S == 'TLE':
    TLE_count = TLE_count + 1
  else:
    RE_count = RE_count + 1

print('AC x ' + str(AC_count))
print('WA x ' + str(WA_count))
print('TLE x ' + str(TLE_count))
print('RE x ' + str(RE_count))

Submission status: Accepted

Solution code:
n = int(input())
count = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
    count[input()] += 1
print('AC x {}'.format(count['AC']))
print('WA x {}'.format(count['WA']))
print('TLE x {}'.format(count['TLE']))
print('RE x {}'.format(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=a+1
  if s=='WA':
    w=w+1
  if s=='TLE':
    t=t+1
  if s=='RE':
    r=r+1

print('AC x',a)
print('WA x',w)
print('TLE x',t)
print('RE x',r)

Submission status: Accepted

Solution code:
a=int(input())
AC=[]
WA=[]
TLE=[]
RE=[]
for i in range(a):
  s=(input())
  if s=='AC':
     AC.append(s)
  if s=='TLE':
     TLE.append(s)   
  if s=='WA':
     WA.append(s)
  if s=='RE':
     RE.append(s)
print('AC','x',len(AC))
print('WA','x',len(WA))
print('TLE','x',len(TLE))
print('RE','x',len(RE))

Submission status: Accepted

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

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

for j, k in judge.items():
  print(j + " x " + str(k))

Submission status: Accepted

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

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

for i, j in test.items():
    print("{} x {}".format(i, j))

Submission status: Accepted

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

import sys
from typing import Any, Callable, Deque, Dict, List, Mapping, Optional, Sequence, Set, Tuple, TypeVar, Union
# import time
# import math, cmath
# import numpy as np
# import scipy.sparse.csgraph as cs            # csgraph_from_dense(ndarray, null_value=inf), bellman_ford(G, return_predecessors=True), dijkstra, floyd_warshall
# import random                                # random, uniform, randint, randrange, shuffle, sample
# import string                                # ascii_lowercase, ascii_uppercase, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from datetime import date, datetime          # date.today(), date(year,month,day) => date obj; datetime.now(), datetime(year,month,day,hour,second,microsecond) => datetime obj; subtraction => timedelta obj
# from datetime.datetime import strptime       # strptime('2019/01/01 10:05:20', '%Y/%m/%d/ %H:%M:%S') returns datetime obj
# from datetime import timedelta               # td.days, td.seconds, td.microseconds, td.total_seconds(). abs function is also available.
# from copy import copy, deepcopy              # use deepcopy to copy multi-dimentional matrix without reference
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import _heapify_max, _heappop_max, _siftdown_max
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from fractions import Fraction               # Fraction(a, b) => a / b ∈ Q. note: Fraction(0.1) do not returns Fraciton(1, 10). Fraction('0.1') returns Fraction(1, 10)



def main():
    Num = Union[int, float]
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79e+308
    # inf = 2 ** 63 - 1             # (for fast JIT compile in PyPy) 9.22e+18
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input():  return sys.stdin.readline().rstrip()
    def ii():     return int(input())
    def isp():    return input().split()
    def mi():     return map(int, input().split())
    def mi_0():   return map(lambda x: int(x)-1, input().split())
    def lmi():    return list(map(int, input().split()))
    def lmi_0():  return list(map(lambda x: int(x)-1, input().split()))
    def li():     return list(input())
    def debug(x): print(x, file=sys.stderr)
    # def _heappush_max(h, item): h.append(item); _siftdown_max(h, 0, len(h)-1)
    
    
    n = ii()
    d = defaultdict(int)

    for _ in range(n):
        s = input()
        d[s] += 1
    
    for result in ('AC', 'WA', 'TLE', 'RE'):
        print(f"{result} x {d[result]}")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
result = [0,0,0,0]
for n in range(N):
    S = input()
    if S == "AC":
        result[0] += 1
    elif S == "WA":
        result[1] += 1
    elif S == "TLE":
        result[2] += 1
    else:
        result[3] += 1
name = ["AC","WA","TLE","RE"]
for res,nam in zip(result,name):
    print("%s x %d"%(nam,res))

Submission status: Accepted

Solution code:
import collections
N=int(input())
l=[input() for _ in range(N)]
tmp = collections.Counter(l)
print('AC','x',tmp["AC"])
print('WA','x',tmp["WA"])
print('TLE','x',tmp["TLE"])
print('RE','x',tmp["RE"])

Submission status: Accepted

Solution code:
N=int(input())
S = ['AC', 'WA', 'TLE', 'RE']
li=[]

for i in range(N):
  jud = input()
  li.append(jud)
a=li.count('AC')
w=li.count('WA')
t=li.count('TLE')
r=li.count('RE')

#print(li)
#print(a)

print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print('RE x '+str(r))

Submission status: Accepted

Solution code:
n = int(input())
result = [input() for i in range(n)]
a=0
w=0
t =0
r=0

for i in range(n):
    if result[i]=="AC":
        a += 1
    elif result[i]=="WA":
        w += 1
    elif result[i]=="TLE":
        t += 1
    else:
        r += 1

print("AC x " + str(a))
print("WA x " + str(w))
print("TLE x "+ str(t))
print("RE x "+ str(r))

Submission status: Accepted

Solution code:
import collections
n = int(input())
S = []
for _ in range(n):
    S.append(input())
c = collections.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"]))

Submission status: Accepted

Solution code:
name = ['AC','WA','TLE','RE']
counter = [0]*len(name)
N = int(input())

for i in range(N):
  txt = input()
  counter[name.index(txt)] += 1

for i in range(len(name)):
	print(name[i]+' x '+str(counter[i]))

Submission status: Accepted

Solution code:
N = int(input())
S = []
for n in range(N):
    S.append(input())
    
C = [0, 0, 0, 0]
for s in S:
    if s == "AC":
        C[0] += 1
    elif s == "WA":
        C[1] += 1
    elif s == "TLE":
        C[2] += 1
    else:
        C[3] += 1
        
print("AC", "x", str(C[0]))
print("WA", "x", str(C[1]))
print("TLE", "x", str(C[2]))
print("RE", "x", str(C[3]))

Submission status: Accepted

Solution code:
n = int(input())
s = []
ans = [0 for i in range(4)]
for _ in range(n):
    ss = input()
    s.append(ss)
    if ss == "AC": ans[0] += 1
    if ss == "WA": ans[1] += 1
    if ss == "TLE": ans[2] += 1
    if ss == "RE": ans[3] += 1
ac = "AC "
tle = "TLE "
wa = "WA "
re = "RE "
kakeru = "x "
ans_str = [str(i) for i in ans]
print(ac + kakeru + ans_str[0])
print(wa+kakeru+ans_str[1])
print(tle+kakeru+ans_str[2])
print(re+kakeru+ans_str[3])

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
s = [input() for i in range(n)]
c = Counter(s)
set_s = set(s)
lists = []
lists.append(int(c["AC"]))
lists.append(int(c["WA"]))
lists.append(int(c["TLE"]))
lists.append(int(c["RE"]))
print("AC x " + str(lists[0]))
print("WA x " + str(lists[1]))
print("TLE x " + str(lists[2]))
print("RE x " + str(lists[3]))

Submission status: Accepted

Solution code:
n = int(input())
a = 0
b = 0
c = 0
d = 0
for i in range(n):
    s = str(input())
    if s == 'AC' :
        a += 1
    elif s == 'WA':
        b += 1
    elif s == 'TLE':
        c += 1
    else:
        d += 1
print('AC x {}'.format(a))
print('WA x {}'.format(b))
print('TLE x {}'.format(c))
print('RE x {}'.format(d))

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:
rows = int(input())
x = [input() for i in range(rows)]
print("AC x {}".format(x.count('AC')))
print("WA x {}".format(x.count('WA')))
print("TLE x {}".format(x.count('TLE')))
print("RE x {}".format(x.count('RE')))

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = list(input() for i in range(N)) 
my_count = Counter(S)
print('AC x {}'.format(my_count['AC']))
print('WA x {}'.format(my_count['WA']))
print('TLE x {}'.format(my_count['TLE']))
print('RE x {}'.format(my_count['RE']))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)]
ac,wa,tle,re=0,0,0,0
for i in range(N):
    if(S[i]=='AC'):
        ac+=1
    elif(S[i]=='WA'):
        wa+=1
    elif(S[i]=='TLE'):
        tle+=1
    elif(S[i]=='RE'):
        re+=1
print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)

Submission status: Accepted

Solution code:
N=int(input())
ans = []
for i in range(N):
    ans.append(str(input()))  
a=ans.count("AC")
b=ans.count("WA")
c=ans.count("TLE")
d=ans.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())

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

for i in range(N):
    Si = input()
    for j in sample:
        if Si == j:
            sample[j] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
casies = [str(input()) for i in range(n)]
import collections
d = collections.Counter(casies)
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())

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

for i in range (n):
    tmp = str(input())
    if tmp == 'AC':
        ac += 1
    elif tmp == 'WA':
        wa += 1
    elif tmp == 'TLE':
        tle += 1
    elif tmp == '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):
    case = input()
    if case == "AC":
        ac += 1
    elif case == "WA":
        wa += 1
    elif case == "TLE":
        tle += 1
    else:
        re += 1
print("AC x"+" "+str(ac),sep=" ")
print("WA x"+" "+str(wa),sep=" ")
print("TLE x"+" "+str(tle),sep=" ")
print("RE x"+" "+str(re),sep=" ")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
while n > 0:
    n = n - 1
    s = input()
    if s == "AC":
        c0 = c0 + 1
    elif s == "TLE":
        c1 = c1 + 1
    elif s == "WA":
        c2 = c2 + 1
    else:
        c3 = c3 + 1
print("AC x", c0)
print("WA x", c2)
print("TLE x", c1)
print("RE x", c3)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# FileName: 	B
# CreatedDate:  2020-07-05 21:06:56 +0900
# LastModified: 2020-07-05 21:14:39 +0900
#


import os
import sys
# import numpy as np
# import pandas as pd
from collections import Counter

def main():
    n = int(input())
    s = []
    for _ in range(n):
        s.append(input())
    cnt = Counter(s)
    if 'AC' in cnt.keys():
        print("AC x {}".format(cnt['AC']))
    else:
        print("AC x 0")
    if 'WA' in cnt.keys():
        print("WA x {}".format(cnt['WA']))
    else:
        print("WA x 0")
    if 'TLE' in cnt.keys():
        print("TLE x {}".format(cnt['TLE']))
    else:
        print("TLE x 0")
    if 'RE' in cnt.keys():
        print("RE x {}".format(cnt['RE']))
    else:
        print("RE x 0")
 
    



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
p = [0]*N
for i in range(N):
    p[i]=input()

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

Submission status: Accepted

Solution code:
import sys
import math
from collections import deque
from collections import defaultdict
from copy import deepcopy
from itertools import accumulate #リストを与えると累積和を返す
def input(): return sys.stdin.readline().rstrip()
from functools import lru_cache #メモ化

def main():
    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')))
    return 0

if __name__ == "__main__":
    main()

Submission status: Accepted

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

count_s = Counter(s)

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

for i in judge:
    c = count_s[i]
    print("{} x {}".format(i,c))

Submission status: Accepted

Solution code:
N = int(input()) 

S={}

for i in range(N):
    x = str(input())
    
    if x in S.keys():
        S[x] += 1
    else:
        S[x] = 1
        
if "AC" in S.keys():
    print("AC x " + str(S["AC"]))
else:
    print("AC x " +"0" )
    
if "WA" in S.keys():
    print("WA x " + str(S["WA"]))
else:
    print("WA x " +"0" )
    
if "TLE" in S.keys(): 
    print("TLE x " + str(S["TLE"]))
else:
    print("TLE x " +"0")
    
if "RE" in S.keys():
  print("RE x " + str(S["RE"]))
else:
  print("RE x " + "0" )

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