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())
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
    elif str_list[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:
t = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(t):
    s = str(input())
    if s == 'AC':
        c0 += 1
    elif s == 'WA':
        c1 += 1
    elif s == 'TLE':
        c2 += 1
    elif s == 'RE':
        c3 += 1
print('AC x ' + str(c0))
print('WA x ' + str(c1))
print('TLE x ' + str(c2))
print('RE x ' + str(c3))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
import math
import fractions
import functools
import copy
from collections import deque
from functools import reduce
from decimal import Decimal


def main():
    n = int(input())
    s = []
    c = [0, 0, 0, 0]
    for _ in range(n):
        s.append(input())
    for result in s:
        if result == "AC":
            c[0] += 1
        if result == "WA":
            c[1] += 1
        if result == "TLE":
            c[2] += 1
        if result == "RE":
            c[3] += 1
    for i in range(4):
        if i == 0:
            print("AC x", c[0])
        if i == 1:
            print("WA x", c[1])
        if i == 2:
            print("TLE x", c[2])
        if i == 3:
            print("RE x", c[3])


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
a=b=c=d=0
for i in range(n):
  e = input()
  if e == 'AC':
    a+=1
  elif e == 'WA':
    b +=1
  elif e == 'TLE':
    c+=1
  else:
    d+=1

    

print('AC x '+str(a)+'\n'+'WA x ' +str(b) + '\n'
      +'TLE x '+str(c) +'\n' + 'RE x '+str(d))

Submission status: Accepted

Solution code:
N = int(input())
S = [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:
n=int(input())
d={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
  x=input()
  d[x]=d[x]+1
for k,v in d.items():
	print(k,"x",v)

Submission status: Accepted

Solution code:
n = int(input())
cnt = [0, 0, 0, 0]
for i in range(n):
    result = str(input())
    if result == 'AC':
        cnt[0] += 1
    elif result == 'WA':
        cnt[1] += 1
    elif result == 'TLE':
        cnt[2] += 1
    else:
        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:
N = int(input())
testCase = []
for i in range(N):
  testCase.append(input())
print("AC x " + str(testCase.count("AC")))
print("WA x " + str(testCase.count("WA")))
print("TLE x " + str(testCase.count("TLE")))
print("RE x " + str(testCase.count("RE")))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


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


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    s = [input() for i in range(n)]
    print('AC x {}'.format(s.count('AC')))
    print('WA x {}'.format(s.count('WA')))
    print('TLE x {}'.format(s.count('TLE')))
    print('RE x {}'.format(s.count('RE')))
    return


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import accumulate, permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


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


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    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 %s' % ac)
    print('WA x %s' % wa)
    print('TLE x %s' % tle)
    print('RE x %s' % re)
    return


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


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


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    s = [input() for i in range(n)]
    print('AC x %s' % s.count('AC'))
    print('WA x %s' % s.count('WA'))
    print('TLE x %s' % s.count('TLE'))
    print('RE x %s' % s.count('RE'))
    return


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations
import sys
import math
import bisect

def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def LS(): return [list(x) for x in sys.stdin.readline().split()]


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


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


sys.setrecursionlimit(1000000)
mod = 1000000007


def solve():
    n = I()
    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')))
    return


if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
import collections
AC=0
WA=0
TLE=0
RE=0
N=int(input())
S=[]
for i in range(N):
  S.append(input())
count=collections.Counter(S)
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())

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

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


d ={}

for x in s:
    d[x] = d.setdefault(x,0) + 1


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

for i in ans_ar:
    ans = i + " x " + str(d.setdefault(i,0))
    print(ans)

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    res = []
    for _ in range(N):
        res.append(str(input()))
    print('AC x {}'.format(res.count('AC')))
    print('WA x {}'.format(res.count('WA')))
    print('TLE x {}'.format(res.count('TLE')))
    print('RE x {}'.format(res.count('RE')))

Submission status: Accepted

Solution code:
n = int(input())
stat2id = {
  "AC": 0,
  "WA": 1,
  "TLE": 2,
  "RE": 3,
}
id2stat = {i:s for s,i in stat2id.items()}
count = [0 for _ in range(4)]

for i in range(n):
  s = input()
  count[stat2id[s]] += 1
for i, c in enumerate(count):
  print(id2stat[i], "x", c)

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())
state = ["AC","WA","TLE","RE"]
judge = {}
for i in state:
    judge[i] = 0
for i in range(N):
    s = input()
    judge[s] += 1
for i in state:
    print(i,"x",judge[i])

Submission status: Accepted

Solution code:
from collections import OrderedDict

def solve(n, s):
    d = OrderedDict([
        ("AC", 0),
        ("WA", 0),
        ("TLE", 0),
        ("RE", 0)
    ])
    for i in range(n):
        d[s[i]] += 1
    for k, v in d.items():
        print("%s x %d" % (k, v))

n = int(input())
s = [input() for i in range(n)]
solve(n, s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = ['']*N
for i in range(N):
    S[i] = input()
ac = 0
wa = 0
tle = 0
re = 0
for s in S:
    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:
from collections import defaultdict
N=int(input())
d=defaultdict(int)
for i in range(N):
  x=input()
  d[x]+=1
print('AC x '+str(d['AC']))
print('WA x '+str(d['WA']))
print('TLE x '+str(d['TLE']))
print('RE x '+str(d['RE']))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
c0 = c1 = c2 = c3 = 0

for i in range(n):
    s = input()
    if s == 'AC':
        c0 += 1
    elif s == 'WA':
        c1 += 1
    elif s == 'TLE':
        c2 += 1
    elif s == 'RE':
        c3 += 1
    
print('AC x {}\nWA x {}\nTLE x {}\nRE x {}'.format(c0, c1, c2, c3))

Submission status: Accepted

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

num = 0 
strings = ['AC', 'WA', 'TLE', 'RE']
num_list = [0]*len(strings)
for i in range(N):
    if S[i] in strings:
        num_list[strings.index(S[i])] += 1
for i in range(len(strings)):
    print(strings[i], ' x ', num_list[i])

Submission status: Accepted

Solution code:
nums = int(input())

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

for i in range(0, nums):
    input_str = input()
    if input_str in S:
        S[input_str] += 1

print('AC x %d' % S['AC'])
print('WA x %d' % S['WA'])
print('TLE x %d' % S['TLE'])
print('RE x %d' % S['RE'])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
a=0
w=0
t=0
r=0
for _ in range(N):
	s=input()
	if s=='AC':
		a+=1
	elif s=='WA':
		w+=1
	elif s=='TLE':
		t+=1
	else:
		r+=1
print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print('RE x '+str(r))

Submission status: Accepted

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

C0, C1, C2, C3 = 0, 0, 0, 0

for i in range(N):
  if S[i]=='AC':
    C0 += 1
  elif S[i]=='WA':
    C1 += 1
  elif S[i]=='TLE':
    C2 += 1
  elif S[i]=='RE':
    C3 += 1

print('AC x ' + str(C0))
print('WA x ' + str(C1))
print('TLE x ' + str(C2))
print('RE x ' + str(C3))

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_i=input()
  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
  elif s_i=="RE":
    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())
AWTR = [0,0,0,0]
for i in range(N):
    T = input()
    AWTR["AWTR".index(T[0])] += 1
A,W,T,R = AWTR
print(f"""AC x {A}
WA x {W}
TLE x {T}
RE x {R}
""")

Submission status: Accepted

Solution code:
n = int(input())
dic = {"AC":0, "WA":0, "TLE":0,"RE":0}
for i in range(n):
    n = input()
    dic[n] += 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())
s = [ 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 sys
sys.setrecursionlimit(10 ** 9)
# input = sys.stdin.readline    ####
def int1(x): return int(x) - 1
def II(): return int(input())
def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())
def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def MS(): return input().split()
def LS(): return list(input())
def LLS(rows_number): return [LS() for _ in range(rows_number)]
def printlist(lst, k=' '): print(k.join(list(map(str, lst))))
INF = float('inf')
# from math import ceil, floor, log2
# from collections import deque
# from itertools import combinations as comb, combinations_with_replacement as comb_w, accumulate, product, permutations
# from heapq import heapify, heappop, heappush
# import numpy as np    # cumsum
# from bisect import bisect_left, bisect_right

def solve():
    N = II()
    jct = {'AC': 0,
           'WA': 0,
           'TLE': 0,
           'RE': 0}
    for i in range(N):
        s = input()
        jct[s] += 1

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



if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
case = int(input())

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

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

for cases in judge:
  print(cases + " x " + str(judge[cases]))

Submission status: Accepted

Solution code:
rows = int(input())
judge = [input() for i in range(rows)]
AC = str(judge.count('AC'))
WA = str(judge.count('WA'))
RE = str(judge.count('RE'))
TLE = str(judge.count('TLE'))
print('AC x ' + AC) 
print('WA x ' + WA) 
print('TLE x ' + TLE) 
print('RE x ' + RE)

Submission status: Accepted

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


# AC x 3
# WA x 1
# TLE x 2
# RE x 0
if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
l = [input() for i in range(N)]
print("AC x {0}".format(l.count('AC')))
print("WA x {0}".format(l.count('WA')))
print("TLE x {0}".format(l.count('TLE')))
print("RE x {0}".format(l.count('RE')))

Submission status: Accepted

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

# print(S)
L = 0
K = 0
J = 0
H = 0
for i in range(N):
  if S[i] == "AC":
    L += 1    
  if S[i] == "WA":
    K += 1 
  if S[i] == "TLE":
    J += 1
  if S[i] == "RE":
    H += 1
print("AC x "+str(L))  
print("WA x "+str(K))
print("TLE x "+str(J))
print("RE x "+str(H))

Submission status: Accepted

Solution code:
#coding:utf-8

N = int(input())

ans = [0,0,0,0]

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

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

Submission status: Accepted

Solution code:
n=int(input())
countlist={'AC':0,"WA":0,"TLE":0,"RE":0}
for i in range(n):
    i=input()
    if i =='AC':
        countlist['AC']+=1
    elif i == 'WA':
        countlist["WA"]+=1
    elif i == 'TLE':
        countlist["TLE"]+=1
    else:
        countlist["RE"]+=1

def main():
    for i in countlist:
        print('{0} x {1}'.format(i,countlist[i]))

main()

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for _ in range(n)]
acn = s.count("AC")
wan = s.count("WA")
tlen = s.count("TLE")
ren = s.count("RE")

print("AC x {}".format(acn))
print("WA x {}".format(wan))
print("TLE x {}".format(tlen))
print("RE x {}".format(ren))

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
    elif s == "WA":
        w = w + 1
    elif s == "TLE":
        t = t + 1
    else:
        r = 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())
(a,w,t,r) = (0,0,0,0)
for i in range(N):
  s = input()
  if s == 'AC':
    a += 1
  elif s == 'WA':
    w += 1
  elif s == 'TLE':
    t += 1
  elif s == 'RE':
    r += 1
    
print('AC x '+str(a))
print('WA x '+str(w))
print('TLE x '+str(t))
print( 'RE x '+str(r))

Submission status: Accepted

Solution code:
answer = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(int(input())):
    answer[input()] += 1
for i, j in answer.items():
    print(i + ' x ' + str(j))

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
  else:
    d+=1
print('AC x',a)
print('WA x',b)
print('TLE x',c)
print('RE x',d)

Submission status: Accepted

Solution code:
n = int(input())

s_list = []
ac = wa = tle = re = 0
for i in range(n):
    s_list.append(input())

for x in range(len(s_list)):
    if s_list[x] == "AC":
        ac += 1
    elif s_list[x] == "WA":
        wa += 1
    elif s_list[x] == "TLE":
        tle += 1
    elif s_list[x] == "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 -*-
"""
Created on Thu Jul  9 15:39:52 2020

@author: TatsuyaYamamoto
"""

N = int(input())

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

for i in range(N):
    temp = input()
    if temp == 'AC':
        AC += 1
    elif temp == 'WA':
        WA += 1
    elif temp == 'TLE':
        TLE += 1
    else:
        RE += 1

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

Submission status: Accepted

Solution code:
n = int(input())

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

d = {key:0 for key in ["AC", "WA", "TLE", "RE"]}
for _ in range(n):
    s = input()
    # print(s)
    
    d[s] += 1

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

Submission status: Accepted

Solution code:
import collections

n = int(input())
KeyLst = ('AC','WA','TLE','RE')
resultLst = (str(input()) for _ in range(n))
countedDic = collections.Counter(resultLst)
for key in KeyLst:
  print('{} x {}'.format(key,countedDic[key]))

Submission status: Accepted

Solution code:
import collections

n = int(input())
KeyLst = ['AC','WA','TLE','RE']
resultLst = [str(input()) for _ in range(n)]
countedDic = collections.Counter(resultLst)
for key in KeyLst:
  print('{} x {}'.format(key,countedDic[key]))

Submission status: Accepted

Solution code:
n = int(input())
KeyLst = ['AC','WA','TLE','RE']
dic = {key:0 for key in KeyLst}
for _ in range(n):
  result = str(input())
  try:
  	dic[result] += 1
  except KeyError as e:
    print(e)
for key in KeyLst:
  print('{} x {}'.format(key,dic[key]))

Submission status: Accepted

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

N = int(input())
dic = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(N):
    dic[input().rstrip('\n')] += 1
for k, v in dic.items():
    print(k, 'x', v)

Submission status: Accepted

Solution code:
n=int(input())
s=[input() for i in range(n)]
c0=0
c1=0
c2=0
c3=0
for i in s:
  if i == 'AC':
    c0+=1
  elif i == 'WA':
    c1+=1
  elif i == 'TLE':
    c2+=1
  else:
    c3+=1
print('AC x '+str(c0))
print('WA x '+str(c1))
print('TLE x '+str(c2))
print('RE x '+str(c3))

Submission status: Accepted

Solution code:
N=int(input())
a1,a2,a3,a4=0,0,0,0
for i in range(N):
  s=input()
  if s=="AC":
    a1+=1
  elif s=="WA":
    a2+=1
  elif s=="TLE":
    a3+=1
  else:
    a4+=1
print("AC x "+str(a1))
print("WA x "+str(a2))
print("TLE x "+str(a3))
print("RE x "+str(a4))

Submission status: Accepted

Solution code:
n=int(input())
dic={"AC":0, "WA":0, "TLE":0, "RE":0}
for i in range(n):
  s=input()
  dic[s]+=1
print("AC x " + 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:
# B - Judge Status Summary
N = int(input())
dic = dict()

dic['AC'] = 0
dic['WA'] = 0
dic['TLE'] = 0
dic['RE'] = 0

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

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

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:
arr = [0,0,0,0]
lis = ["AC","WA","TLE","RE"]
for _ in range(int(input())):
  s = input()
  if s == "AC": arr[0] += 1
  elif s == "WA": arr[1] += 1
  elif s == "TLE": arr[2] += 1
  else: arr[3] += 1
for i in range(4):
  print(lis[i],"x",arr[i])

Submission status: Accepted

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

Submission status: Accepted

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

def linput(ty=int, cvt=list):
	return cvt(map(ty,input().split()))

def vinput(rep=1, ty=int, cvt=list):
	return cvt(ty(input().rstrip()) for _ in [0,]*rep)

def gcd(a: int, b: int):
	while b: a, b = b, a%b
	return a

def lcm(a: int, b: int):
	return a * b // gcd(a, b)

def main():
	N = int(input())
	vS = vinput(N,str)
	
	res = 0

	vT = "AC WA TLE RE".split()
	for t in vT:
		print(t,"x",vS.count(t))
	
	#sT = "No Yes".split()
	#print(sT[res])
	#print(res)

if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:
S = int(input())
result = {
    "AC"  : 0,
    "WA"  : 0,
    "TLE" : 0,
    "RE"  : 0
}
for _ in range(S):
    i = input()
    result[i] += 1
    
for key, value in result.items():
    print(f'{key} x {value}')

Submission status: Accepted

Solution code:
n = int(input())

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

for i in range(n):
    score[input()] += 1
    
for key, value in score.items():
    print('{} x {}'.format(key, value))

Submission status: Accepted

Solution code:
from collections import defaultdict
x = defaultdict(int)
cc = int(input())
for _ in range(cc):
  ret = input().strip()
  x[ret] += 1
  
order = ['AC', 'WA', 'TLE', 'RE']
for status in order:
  print(f'{status} x {x[status]}')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
s = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(1,s+1):
    ch = input()
    if ch == "AC":
        ac += 1
    elif ch == "WA":
        wa += 1
    elif ch == "TLE":
        tle +=1
    elif ch == "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())
import collections
co = collections.Counter()
for i in range(n):
    s = input()
    co[s] +=1
print(f"AC x {co['AC']}")
print(f"WA x {co['WA']}")
print(f"TLE x {co['TLE']}")
print(f"RE x {co['RE']}")

Submission status: Accepted

Solution code:
n=int(input())
nums=[0,0,0,0]
while n>0:
  s=input().strip()[0]
  if s=='A':
    nums[0] += 1
  elif s=='W':
    nums[1] += 1
  elif s=='T':
    nums[2] += 1
  elif s=='R':
    nums[3] += 1
  n -= 1
verds=['AC','WA','TLE','RE']
for i in range(4):
  print('{} x {}'.format(verds[i],nums[i]))

Submission status: Accepted

Solution code:
n=int(input())
C1=0
C2=0
C3=0
C4=0
for i in range(n):
    k=str(input())
    if k=="AC":
        C1 +=1
    elif k=="WA":
        C2 += 1
    elif k=="TLE":
        C3 += 1
    else:
        C4 += 1
        
    #l.append(str(input()))



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

C1=l.count("AC")
C2=l.count("WA")
C3=l.count("TLE")
C4=l.count("RE")

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())
status={'AC':0, 'WA':0, 'TLE':0, 'RE':0}
results = [input() for n in range(N)]
for result in results:
     if result in status.keys():
         status[result] += 1
for k, v in status.items():
    print('{} x {}'.format(k, v))

Submission status: Accepted

Solution code:
n = int(input())
dict = {}
for _ in range(n):
    s = input()
    dict[s] = dict.get(s, 0) + 1
for key in ["AC", "WA", "TLE", "RE"]:
    print("{} x {}".format(key, dict.get(key, 0)))

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


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

for i in range(1,n+1):
    str=input()
    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())
s = [input() for i in range(N)]
for v in ('AC', 'WA', 'TLE', 'RE'):
    print('{} x {}'.format(v, s.count(v)))

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())
from collections import Counter
S=[input() for i in range(N)]
c=Counter(S)
for s in ('AC','WA','TLE','RE'):
    print(s,'x',c[s])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
count = {}
for _ in range(n):
  type = input()
  count.setdefault(type, 0)
  count[type] += 1
for type in ['AC', 'WA', 'TLE', 'RE']:
  if type in count:
    print(type + ' x ' + str(count[type]))
  else:
    print(type + ' x 0')

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", c0)
print("WA x", c1)
print("TLE x", c2)
print("RE x", c3)