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

def Next(): return input()
def NextInt(): return int(Next())
def NextInts(): return map(int,input().split())
def Nexts(): return map(str,input().split())
def NextIntList(): return list(map(int,input().split()))
def RowInts(n): return [input() for i in range(n)]

n = NextInt()
ans = [0]*4
da = ['AC', 'WA', 'TLE', 'RE']
for i in range(n):
    s = input()
    for j in range(4):
        if da[j] == s:
            ans[j] += 1
for i in range(4):
    print(da[i], 'x', ans[i])

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
from math import floor, sqrt, factorial, hypot, log  # log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict, deque
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint


def ceil(a, b): return (a + b - 1) // b


inf = float('inf')
mod = 10 ** 9 + 7


def pprint(*A):
    for a in A:     print(*a, sep='\n')


def INT_(n): return int(n) - 1


def MI(): return map(int, input().split())


def MF(): return map(float, input().split())


def MI_(): return map(INT_, input().split())


def LI(): return list(MI())


def LI_(): return [int(x) - 1 for x in input().split()]


def LF(): return list(MF())


def LIN(n: int): return [I() for _ in range(n)]


def LLIN(n: int): return [LI() for _ in range(n)]


def LLIN_(n: int): return [LI_() for _ in range(n)]


def LLI(): return [list(map(int, l.split())) for l in input()]


def I(): return int(input())


def F(): return float(input())


def ST(): return input().replace('\n', '')


def main():
    N = I()
    S = []
    for _ in range(N):
        S.append(ST())
    cnt = Counter(S)
    print('AC x', cnt['AC'])
    print('WA x', cnt['WA'])
    print('TLE x', cnt['TLE'])
    print('RE x', cnt['RE'])

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import exit
import math
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

n = ii()
s = [input() for i in range(n)]

judge = ["AC", "WA", "TLE", "RE"]
ans = [0]*4
for i in range(n):
    for j in range(4):
        if s[i] == judge[j]:
            ans[j] += 1

for i in range(4):
    print(judge[i] + " x " + str(ans[i]))

Submission status: Accepted

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

S=[input() for i in range(N)]
for s in S:
    if s =='AC':
        ac=ac+1
    elif s == 'WA':
        wa = wa + 1
    elif s == 'TLE':
        tle = tle + 1
    else:
        re = re + 1

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

Submission status: Accepted

Solution code:
N = int(input())
List = ['AC', 'WA', 'TLE', 'RE']
List2 = []
for _ in range(N):
    S = input()
    List2.append(S)
result = dict((i, List2.count(i)) for i in List)
for key, value in result.items():
    print(key, "x", value)

Submission status: Accepted

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

Submission status: Accepted

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

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

AC_c = 0
WA_c = 0
TLE_c = 0
RE_c = 0
for S in S_list:
    if S == "AC\n":
        AC_c += 1
    elif S == "WA\n":
        WA_c += 1
    elif S == "TLE\n":
        TLE_c += 1
    else:
        RE_c += 1
print("AC x " + str(AC_c))
print("WA x " + str(WA_c))
print("TLE x " + str(TLE_c))
print("RE x " + str(RE_c))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def exit(*argv, **kwarg):
    print(*argv, **kwarg)
    sys.exit()


def mina(*argv, sub=1): return list(map(lambda x: x - sub, argv))
# 受け渡されたすべての要素からsubだけ引く.リストを*をつけて展開しておくこと


def a_int(): return int(read())


def ints(): return list(map(int, read().split()))


def read_col(H):
    '''H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_tuple(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_matrix(H):
    '''H is number of rows'''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter, xor, add
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right
from functools import reduce
from math import gcd


def lcm(a, b):
    # 最小公倍数
    g = gcd(a, b)
    return a // g * b


N = a_int()
S = []
for _ in range(N):
    S.append(read()[:-1])
cnt = Counter(S)
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:
n=int(input())
c=[0,0,0,0]
for i in range(n):
    check=input()
    if (check=="AC"):
        c[0]+=1
    elif(check=="WA"):
        c[1]+=1
    elif(check=="TLE"):
        c[2]+=1
    else:
        c[3]+=1

ans=["","","",""]
ans[0]="AC x "+str(c[0])
ans[1]="WA x "+str(c[1])
ans[2]="TLE x "+str(c[2])
ans[3]="RE x "+str(c[3])

for i in range(4):
    print(ans[i])

Submission status: Accepted

Solution code:
N = int(input()) 

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

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

for str in s :
  if str == "AC" :
    AC += 1
  elif str == "WA" :
    WA += 1
  elif str == "TLE" :
    TLE += 1
  elif str == "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 = ["AC"] * n
c = [0]*4

for i in range(n):
  a[i] = input()
  if(a[i]=="AC"):
    c[0] += 1
  if(a[i]=="WA"):
    c[1] += 1
  if(a[i]=="TLE"):
    c[2] += 1
  if(a[i]=="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 = list()

for i in range(N):
    S = input()
    s.append(S)
    i += 1

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


a=0
b=0
c=0                
d=0                
                
for i in range(n):
    if str_list[i] == 'AC':
    	a += 1
    elif str_list[i] == 'WA':
    	b += 1
    elif str_list[i] == 'TLE':
    	c +=1
    else :
    	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())
list = [input() for i in range(N)]

C0 = list.count("AC")
C1 = list.count("WA")
C2 = list.count("TLE")
C3  = list.count("RE")

print("AC","x",C0)
print("WA","x",C1)
print("TLE","x",C2)
print("RE","x",C3)

Submission status: Accepted

Solution code:
n=int(input())

a = []

for _ in range(n):
  a.append(input())

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

Submission status: Accepted

Solution code:
ac = 0
wa = 0
tle = 0
re = 0

num = int(input())

while(num>0):

	tipo = input().upper()
	
	if(tipo == "AC"): ac+=1
	elif(tipo == "WA"): wa+=1
	elif(tipo == "TLE"): tle+=1
	elif(tipo == "RE"): re+=1
	
	num-=1

print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(ac,wa,tle,re))

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
  TEST = input()
  if TEST == "AC":
    AC += 1
  elif TEST == "WA":
    WA += 1
  elif TEST == "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 = [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:
import collections
N = int(input())
S = []
for _ in range(N):
  S.append(input())

counter = collections.Counter(S)
AC = counter['AC']
WA = counter['WA']
TLE = counter['TLE']
RE = counter['RE']

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

aa=["AC","WA","TLE","RE"]
for a in aa:
    print("{} x {}".format(a,str(s.count(a))))

Submission status: Accepted

Solution code:
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
others = 0
for i in range(N):
  case = input()
  if case == "AC":
    AC += 1
      
  elif case == "WA":
    WA += 1
      
  elif case == "TLE":
    TLE += 1
      
  elif case == "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:
a = int(input())
 
AC = 0
WA = 0
TLE = 0
RE = 0
 
for i in range(a):
    s = input()
    if s == "AC":
        AC = AC + 1
        continue
    if s == "WA":
        WA = WA + 1
        continue
    if s == "TLE":
        TLE = TLE + 1
        continue
    if s == "RE":
        RE = RE + 1
        continue
 
 
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())
ac_num = 0
tle_num = 0
wa_num = 0
re_num = 0
for i in range(N):
  result = input()
  if result == "AC":
    ac_num += 1
  elif result == "TLE":
    tle_num += 1
  elif result == "WA":
    wa_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:
n = int(input())
x = [input() for i in range(n)]

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

Submission status: Accepted

Solution code:
l = []
for _ in range(int(input())):
    l.append(input())
from collections import Counter
c = Counter(l)
print("AC x {}".format(c['AC']))
print("WA x {}".format(c['WA']))
print("TLE x {}".format(c['TLE']))
print("RE x {}".format(c['RE']))

Submission status: Accepted

Solution code:
N=int(input())
S=[]
for _ in range(N):
  s=input()
  S.append(s)
  
C0=S.count("AC")
C1=S.count("WA")
C2=S.count("TLE")
C3=S.count("RE")

ans=[C0,C1,C2,C3]
moji=["AC","WA","TLE"," RE"]

for i in range(4):
    print(moji[i]+" x "+str(ans[i]))

Submission status: Accepted

Solution code:
N = int(input())
S = []
for _ in range(N):
  s = input()
  S.append(s)
kekka = [0,0,0,0]
for s in S:
  if s=='AC':
    kekka[0] += 1
  if s=='WA':
    kekka[1] += 1
  if s=='TLE':
    kekka[2] += 1
  if s=='RE':
    kekka[3] += 1
judge = ['AC','WA','TLE','RE']
for i in range(4):
  print(judge[i],'x',kekka[i])

Submission status: Accepted

Solution code:
n = int(input())
a=0
w=0
t=0
r=0

for i in range(n):
    ans = input()

    if ans == 'AC':
        a+=1
    elif ans == 'WA':
        w+=1
    elif ans == 'TLE':
        t+=1
    else:
        r+=1

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

Submission status: Accepted

Solution code:
N=int(input())
S=[]
for i in range(N):
    S.append(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:
dic={"AC":0, 'WA':0, 'TLE':0, "RE":0}
t = int(input())
for i in range(t):
	dic[input()]+=1
for key,val in dic.items():
	print(key+" x "+str(val))

Submission status: Accepted

Solution code:
n=int(input())
AC=0
WA=0
TLE=0
RE=0
for n in range(n):
    s=input()
    if s=='AC':
        AC+=1
    elif s=='WA':
        WA+=1
    elif s=='TLE':
        TLE+=1
    else:
        RE+=1
print('AC x ',AC)
print('WA x ',WA)
print('TLE x ',TLE)
print('RE x ',RE)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 行数を取得
num_lines = int(input())
li = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

# 1行ずつ取り出し
for _ in range(num_lines):
    s = input()
    for key, value in li.items():
      if s.count(key) > 0 :
        li[key] = int(value) + 1

for key, value in li.items():
  print('{} x {}'.format(key, value))

Submission status: Accepted

Solution code:
from sys import exit
# import copy
# import numpy as np
# from collections import deque


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

cnt = [0, 0, 0, 0]
for _ in range(n):
    tmp = input()
    if tmp == "AC":
        cnt[0] += 1
    elif tmp == "WA":
        cnt[1] += 1
    elif tmp == "TLE":
        cnt[2] += 1
    elif tmp == "RE":
        cnt[3] += 1

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

Submission status: Accepted

Solution code:
ru = int(input())

a = [input() for i in range(ru)] 


print('AC x '+str(a.count('AC')))
print('WA x '+str(a.count('WA')))
print('TLE x '+str(a.count('TLE')))
print('RE x '+str(a.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
  elif s == "WA":
    wa += 1
  elif s == "TLE":
    tle += 1
  else:
    re += 1
print(f'AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}')

Submission status: Accepted

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

for i in range(n):
    s = input()
    for k in judges:
        if k == s:
            judges[k] += 1

for k in judges:
    print(k + ' x ' + str(judges[k]))

Submission status: Accepted

Solution code:
n=int(input())
ac,wa,tl,re=0,0,0,0
for i in range(n):
  s=input()
  if(s=="AC"):
    ac+=1
  elif(s=="WA"):
    wa+=1
  elif(s=="TLE"):
    tl+=1
  else:
    re+=1
print("AC",'x',ac)
print("WA",'x',wa)
print("TLE",'x',tl)
print("RE",'x',re)

Submission status: Accepted

Solution code:
from collections import OrderedDict
N = int(input())
S = OrderedDict([('AC', 0), ('WA', 0), ('TLE', 0), ('RE', 0)])
for i in range(N):
    text = input()
    if text in S.keys():
        S[text] =S[text] + 1
        # print(S)

for key, value in S.items():
    print('{} x {}'.format(key, value))

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor, acos, asin, atan, sqrt, tan, cos, pi
from operator import mul
from functools import reduce
from pprint import pprint


sys.setrecursionlimit(10 ** 7)
INF = 10 ** 20
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


mod = 10 ** 9 + 7


n = I()
a, t, w, r = 0, 0, 0, 0
for _ in range(n):
    s = S()
    if s[0] == "A":
        a += 1
    elif s[0] == "T":
        t += 1
    elif s[0] == "R":
        r += 1
    else:
        w += 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 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())
a = [input() for i in range(N)]

c0 = a.count("AC")
c1 = a.count("WA")
c2 = a.count("TLE")
c3 = a.count("RE")

print("AC x %d" % c0)
print("WA x %d" % c1)
print("TLE x %d" % c2)
print("RE x %d" % c3)

Submission status: Accepted

Solution code:
b = int(input())
a = [input() for i in range(b)]
ac = a.count('AC')
wa = a.count('WA')
tle = a.count('TLE')
re = a.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:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import itertools
import random
from decimal import *

input = sys.stdin.readline

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	N = inputInt()

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

	for i in range(N):
		s = inputStr()
		ans[s] += 1

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

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
a = int(input())
jud = []
for i in range(a):
	jud.append(input().strip())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
m = [input() for i in range(n)]
 
ans = [0,0,0,0]
 
for i in m:
    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:
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())
d = {}
li = ['AC', 'WA', 'TLE', 'RE']

for _ in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

for i in li:
    if i in d:
        print('{} x {}'.format(i, str(d[i])))
    else:
        print('{} x {}'.format(i, str(0)))

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(0, N): 
    a = input()
    ans[a] += 1

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

Submission status: Accepted

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

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())
C0 = 0
C1 = 0
C2 = 0
C3 = 0
for i in range(N):
  result = input()
  if result == "AC":
    C0 += 1
  elif result == "WA":
    C1 += 1
  elif result == "TLE":
    C2 += 1
  else:
    C3 += 1
    
print("AC x", C0)
print("WA x", C1)
print("TLE x", C2)
print("RE x", C3)

Submission status: Accepted

Solution code:
from collections import Counter

n_inputs = int(input())
a = []
for _ in range(n_inputs):
  a.append(input())
    
count = Counter(a)

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

for t in types:
  print(f"{t} x {count[t]}")

Submission status: Accepted

Solution code:
n = int(input())

verdicts = []
ac = 0
wa = 0
tle = 0
re = 0

for _ in range(n):
    t = input()
    verdicts.append(t.upper())
    
for verdict in verdicts:
    if verdict == 'AC':
        ac += 1
    elif verdict == 'WA':
        wa += 1
    elif verdict == 'TLE':
        tle += 1
    elif verdict == 'RE':
        re += 1
        
print(f'AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}')

Submission status: Accepted

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

print("AC x {}".format(a.count("AC")))
print("WA x {}".format(a.count("WA")))
print("TLE x {}".format(a.count("TLE")))
print("RE x {}".format(a.count("RE")))

Submission status: Accepted

Solution code:
import collections
def II(): return int(input())
N=II()
L=[]
for i in range(N):
  s=input()
  L.append(s)
c=collections.Counter(L)
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:
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 {}".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)]
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
    else:
        RE+=1
print('AC x', AC)
print('WA x', WA)
print('TLE x', TLE)
print('RE x', RE)

Submission status: Accepted

Solution code:
from collections import defaultdict
 
d=defaultdict(int)
 
for i in range(int(input())):
  s=input()
  d[s]+=1
  
print("AC x",d["AC"])
print("WA x",d["WA"])
print("TLE x",d["TLE"])
print("RE x",d["RE"])

Submission status: Accepted

Solution code:
n=int(input())
l=[0,0,0,0]
while(n):
  r=input()
  if(r=="AC"):
    l[0]=l[0]+1
  elif(r=="WA"):
    l[1]=l[1]+1
  elif(r=="TLE"):
    l[2]=l[2]+1
  elif(r=="RE"):
    l[3]=l[3]+1
  n=n-1  
print("AC x {}".format(l[0]))
print("WA x {}".format(l[1]))
print("TLE x {}".format(l[2]))
print("RE x {}".format(l[3]))

Submission status: Accepted

Solution code:
n = int(input())

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

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

for key in judge.keys():
    print(key + ' x ' + str(judge[key]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

accnt = 0
wacnt = 0
tlecnt = 0
recnt = 0

for i in range(n):
  query = input()
  if query == 'AC':
    accnt += 1
  elif query == 'WA':
    wacnt +=1
  elif query == 'TLE':
    tlecnt += 1
  else:
    recnt += 1

print('AC x',accnt)
print('WA x',wacnt)
print('TLE x',tlecnt)
print('RE x',recnt)

Submission status: Accepted

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

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

for j in verdict:
    opt_dict[j] = opt_dict[j] + 1

for k, v in opt_dict.items():
    print(f"{k} x {v}")

Submission status: Accepted

Solution code:
N=int(input())
list=[]
for i in range(N):
  S=input()
  if S:
    list.append(S)
C0=list.count("AC")
C1=list.count("WA")
C2=list.count("TLE")
C3=list.count("RE")
print ("AC x ",C0)
print ("WA x ",C1)
print ("TLE x ",C2)
print ("RE x ",C3)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for i in range(n)]
 
i = 0
a = 0
t = 0
w = 0
r = 0
 
for i in range(n):
  if s[i] == "AC":
    a += 1
    i += 1
  elif s[i] == "TLE":
    t += 1
    i += 1
  elif s[i] == "WA":
    w += 1
    i += 1
  else:
    r += 1
    i += 1
 
print("""AC x {0}
WA x {1}
TLE x {2}
RE x {3}""". format(a, w, t, r))

Submission status: Accepted

Solution code:
count = int(input())

ac = 0
wa = 0
tle = 0
re = 0
for i in range(count):
  ans = input()
  if ans == "AC":
    ac = ac + 1
  elif ans == "WA":
    wa = wa + 1
  elif ans == "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:
na=0
nw=0
nt=0
nr=0
i = int(input())
for n in range(i):
    a=input()
    if a=="AC":
        na= na +1
    elif a=="WA":
        nw= nw+1
    elif a=="TLE":
        nt=nt+1
    else:
        nr=nr+1
print('AC x %d'%na)
print('WA x %d'%nw)
print('TLE x %d'%nt)
print('RE x %d'%nr)

Submission status: Accepted

Solution code:
n = int(input())

verdicts = []
ac = 0
wa = 0
tle = 0
re = 0

for _ in range(n):
    a = input()
    verdicts.append(a.upper())
    
for verdict in verdicts:
    if verdict == 'AC':
        ac += 1
    elif verdict == 'WA':
        wa += 1
    elif verdict == 'TLE':
        tle += 1
    elif verdict == 'RE':
        re += 1
        
print(f'AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}')

Submission status: Accepted

Solution code:
n = int(input())

list = []
for i in range(n):
  a = input()
  list.append(a)

print('AC x {}'.format(list.count('AC')))
print('WA x {}'.format(list.count('WA')))
print('TLE x {}'.format(list.count('TLE')))
print('RE x {}'.format(list.count('RE')))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
 
judgement = []
while True:
  try:
    judgement.append(input())
  except:
    break
 
counter = collections.Counter(judgement)
 
n_ac = counter.get('AC', 0)
n_wa = counter.get('WA', 0)
n_tle = counter.get('TLE', 0)
n_re = counter.get('RE', 0)
 
print('AC x {}'.format(n_ac))
print('WA x {}'.format(n_wa))
print('TLE x {}'.format(n_tle))
print('RE x {}'.format(n_re))

Submission status: Accepted

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

countAC = 0
countWA = 0
countTLE = 0 
countRE = 0

for i in range(N):
    if S[i]=="AC":
        countAC += 1
    elif S[i]=="WA":
        countWA += 1
    elif S[i]=="TLE":
        countTLE += 1
    else:
        countRE += 1

print("AC x ",end='')
print(countAC)
print("WA x ",end='')
print(countWA)
print("TLE x ",end='')
print(countTLE)
print("RE x ",end='') 
print(countRE)

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
s = list(str(input()) for _ in range(n))
C_s = Counter(s)
s_l = ['AC', 'WA', 'TLE', 'RE']
for item in s_l:
    print(item, ' x ', C_s[item])

Submission status: Accepted

Solution code:
N = int(input())

import collections
l = []
for n in range(N):
  S = input()
  l.append(S)

c = collections.Counter(l)


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:
a=int(input())

s=[input() for i in range(a)]

print("AC x {:d}".format(s.count("AC")))
print("WA x {:d}".format(s.count("WA")))
print("TLE x {:d}".format(s.count("TLE")))
print("RE x {:d}".format(s.count("RE")))

Submission status: Accepted

Solution code:
n=int(input())
s=[str(input()) for _ 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())
ac,wa,tle,re=0,0,0,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:
import collections
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())
results = [input() for i in range(N)]

counts = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0,
}
for result in results:
    if result == 'AC':
        counts['AC'] += 1
    elif result == 'WA':
        counts['WA'] += 1
    elif result == 'TLE':
        counts['TLE'] += 1
    elif result == 'RE':
        counts['RE'] += 1
answer = '''
AC x {}
WA x {}
TLE x {}
RE x {}
'''.format(counts['AC'], counts['WA'], counts['TLE'], counts['RE'])
print(answer)