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 Counter

N = int(input())

c = Counter()

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

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

Submission status: Accepted

Solution code:
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 == "TLE":
        tle += 1
    elif s == "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:
import collections
N = int(input())
S = list(input() for _ in range(N))
A = collections.Counter(S)
#print(A)
B = ["AC","WA","TLE","RE"]
for i in B:
    print(i+" x "+str(A[i]))

Submission status: Accepted

Solution code:
N = int(input())

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

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict
n = int(input())
d = defaultdict(lambda: 0)

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

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

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
c = Counter([input() for _ in range(N)])
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())
D={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(N):
    D[input()]+=1
X=["AC","WA","TLE","RE"]
for s in X:
    print("{0} x {1}".format(s,D[s]))

Submission status: Accepted

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

n = int(input())

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

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())
buf = ["AC","WA","TLE","RE"]
num = [0 for i in range(4)]

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

    for j in range(4):
        if s == buf[j]:
            num[j] += 1

for i in range(4):
    print(buf[i]+" x "+str(num[i]))

Submission status: Accepted

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

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:
#from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations,permutations,accumulate # (string,3) 3回
#from collections import deque
from collections import deque,defaultdict,Counter
import decimal
import re
#import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7
#mod = 9982443453
def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
n = I()
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    s = input()
    if s == 'AC':
        ac += 1
    elif s == 'WA':
        wa += 1
    elif s == 'TLE':
        tle += 1
    else:
        re += 1
print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)

Submission status: Accepted

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

print('AC x ' + 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:
def main():

    N = int(input())
    d = dict()
    for v in ['AC', 'WA', 'TLE', 'RE']:
        d[v] = 0
    for _ in range(N):
        S = input()
        d[S] += 1

    for v in ['AC', 'WA', 'TLE', 'RE']:
        print(v + " x " + str(d[v]))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	if len(x) == 0:
		return []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa != x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
	ll = 0
	rr = r
	while True:
		mid = (ll+rr)//2

	if rr == mid:
		return ll
	if (ここに評価入れる):
		rr = mid
	else:
		ll = mid+1
"""

n = onem()

data = ["AC","WA","TLE","RE"]
dp = [0 for i in range(4)]

for i in range(n):
	ppp = input()[:-1]
	for j in range(4):
		if ppp == data[j]:
			dp[j] += 1
for i in range(4):
	print("{0} x {1}".format(data[i],dp[i]))

Submission status: Accepted

Solution code:
n = int(input())
AC, WA, TLE, RE = 0, 0, 0, 0
for _ in range(n):
    s = input()
    if s == "AC":
        AC += 1
    elif s == "TLE":
        TLE += 1
    elif s == "WA":
        WA += 1
    elif s == "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:
n = int(input())
a = [0 for _ in range(4)]
b = ['AC', 'WA', 'TLE', 'RE']
for _ in range(n):
    s = input()
    a[b.index(s)] += 1
print("AC x " + str(a[0]))
print("WA x " + str(a[1]))
print("TLE x " + str(a[2]))
print("RE x " + str(a[3]))

Submission status: Accepted

Solution code:
N = int(input())

d = {"AC":0,"WA":1,"TLE":2,"RE":3}
ans = [0]*4
for i in range(N):
    S = input()
    ans[d[S]]+=1

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

Submission status: Accepted

Solution code:
import sys
import collections


sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    N = int(input())
    S = [input().strip() for _ in range(N)]

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

    
    
    

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)]
R={}
R["AC"] = 0
R["WA"] = 0
R["TLE"] = 0
R["RE"] = 0

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

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    l = ["AC", "WA", "TLE", "RE"]
    cnt = {ll: 0 for ll in l}
    for _ in range(n):
        cnt[input()] += 1
    for ll in l:
        print(ll, "x", cnt[ll])


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
#import numpy as np
import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit
#from scipy.sparse.csgraph import dijkstra
#from scipy.sparse import csr_matrix
ipt = stdin.readline
setrecursionlimit(10**7)

def main():
    n = int(ipt())
    a = 0
    w = 0
    t = 0
    r = 0
    for i in range(n):
        s = input()
        if s == "AC":
            a += 1
        elif s == "WA":
            w += 1
        elif s == "TLE":
            t += 1
        else:
            r += 1
    print("AC x",a)
    print("WA x",w)
    print("TLE x",t)
    print("RE x",r)

    return None

if __name__ == '__main__':
    main()

Submission status: Accepted

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

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
f = defaultdict(lambda : 0)
for i in range(n):
    s = input()
    f[s] += 1

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

Submission status: Accepted

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

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

    print(f'AC x {ac}')
    print(f'WA x {wa}')
    print(f'TLE x {tle}')
    print(f'RE x {re}')

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
n = int(input())
B = [input() for i in range(n)]
A = ["AC","WA","TLE","RE"]
C = [0] * 4
for i in range(n):
    for j in range(4):
        if B[i] == A[j]:
            C[j] += 1

for i in range(4):
    print("{} x {}".format(A[i],C[i]))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
k=[0,0,0,0]
l=["AC","WA","TLE","RE"]
for i in range(n):
    p=l.index(input())
    k[p]+=1
for i in range(4):
    print(l[i],"x",k[i])

Submission status: Accepted

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

'''
Author: andyli
Time: 2020-07-05 19:56:17
'''

import os
from io import BytesIO, IOBase
import sys


def main():
    n = int(input())
    ac,wa,tle,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':
            tle += 1
        elif s == 'RE':
            re += 1
    print('AC x', ac)
    print('WA x', wa)
    print('TLE x', tle)
    print('RE x', re)
    return


# region fastio
BUFSIZE = 1048576


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = 'x' in file.mode or 'r' not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b'\n') + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode('ascii'))
        self.read = lambda: self.buffer.read().decode('ascii')
        self.readline = lambda: self.buffer.readline().decode('ascii')


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
def input(): return sys.stdin.readline().rstrip('\r\n')

# endregion


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())

c = Counter(input() for _ in range(N))

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:
from collections import Counter
N=int(input())
S=Counter(input()for _ in range(N))
for s in ["AC","WA","TLE","RE"]:
    i=S[s] if s in S else 0
    print(f"{s} x {i}")

Submission status: Accepted

Solution code:
N = int(input())
ac = 0
tle = 0
wa = 0
re = 0
for i in range(N):
    s = input()
    if s == "AC":
        ac += 1
    elif s == "TLE":
        tle += 1
    elif s == "WA":
        wa += 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:
import sys
from collections import Counter

sys.setrecursionlimit(10 ** 6)
INF = float("inf")
MOD = 10 ** 9 + 7


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


def main():
    N = int(input())
    S = [input() for _ in range(N)]
    c = Counter(S)
    print("AC x {}".format(c["AC"]))
    print("WA x {}".format(c["WA"]))
    print("TLE x {}".format(c["TLE"]))
    print("RE x {}".format(c["RE"]))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]
C = Counter(S)
print("AC x " + str(C["AC"]))
print("WA x " + str(C["WA"]))
print("TLE x " + str(C["TLE"]))
print("RE x " + str(C["RE"]))

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
freq = Counter()
for i in range(N):
    freq[input()] += 1

for k in ["AC", "WA", "TLE", "RE"]:
    print(k + " x " + str(freq[k]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
AC, WA, TLE, RE = 0, 0, 0, 0
for _ 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", AC)
print("WA x", WA)
print("TLE x", TLE)
print("RE x", RE)

Submission status: Accepted

Solution code:
n = int(input())
a = ["AC", "WA", "TLE", "RE"]
count = [0] * 4
for _ in range(n):
    s = input()
    count[a.index(s)] += 1
for i in range(4):
    print(a[i], "x", count[i])

Submission status: Accepted

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

sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

N=int(input())
S=[input() for i in range(N)]
for a in ['AC','WA','TLE','RE']:
    c=0
    for s in S:
        if s==a:
            c+=1
    print(a+' x '+str(c))

Submission status: Accepted

Solution code:
N = int(input())

a=0
w=0
t=0
r=0

for vreioieiov in range(N):
	I = str(input())
	if I=="AC":
		a+=1
	elif I=="WA":
		w+=1
	elif 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))



# 2darray [[0] * 4 for i in range(3)]

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    cnt=[0]*4
    s=["AC","WA","TLE","RE"]
    n=II()
    for _ in range(n):
        t=SI()
        i=s.index(t)
        cnt[i]+=1
    for i in range(4):
        print("{} x {}".format(s[i],cnt[i]))

main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

dic = {
  'AC': 0,
  'WA': 0,
  'TLE': 0,
  'RE': 0
}
for i in range(N):
  string = input()
  dic[string] += 1

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

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

for s in dic.keys():
    print(s,"x",dic[s])

Submission status: Accepted

Solution code:
N = int(input())
count = [0]*4
for _ in range(N):
    count[["AC", "WA", "TLE", "RE"].index(input())] += 1
print("AC x",count[0])
print("WA x",count[1])
print("TLE x",count[2])
print("RE x",count[3])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC173b


def main():
    import sys
    sys.setrecursionlimit(10**6)
    # 再帰関数を使わない限りPypyで出すこと

    def dump(*args):
        sys.stderr.write(str(args))

    n = int(input())
    s = [input() for _ in range(n)]
    from collections import Counter
    d = Counter(s)
    for i in ['AC', "WA", "TLE", "RE"]:
        print(i, 'x', d[i])


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter as co
n=int(input())
var=co([input()for i in range(n)])
for k in "AC WA TLE RE".split():
    if k not in var:print(k,"x",0)
    else:print(k,"x",var[k])

Submission status: Accepted

Solution code:
N = int(input())
A = ["AC", "WA", "TLE", "RE"]
ans = [0, 0, 0, 0]

for i in range(N):
  s = str(input())
  p = A.index(s)
  ans[p] += 1
  
for i in range(4):
  print(A[i], "x", ans[i])

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10, gcd
from itertools import permutations, combinations, product, accumulate, combinations_with_replacement
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
#from fractions import gcd
from decimal import *
import heapq
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 1, 0, -1, 1, -1, -1, 1]
dy = [1, 0, -1, 0, 1, -1, 1, -1]
debugmode = True

n = INT()
s = [STR() for _ in range(n)]
lst = ['AC', 'WA', 'TLE', 'RE']
for i in lst:
    print(i, 'x', s.count(i))

Submission status: Accepted

Solution code:
from sys import stdin
from sys import setrecursionlimit
from collections import Counter, deque, defaultdict
from math import floor, ceil
from bisect import bisect_left
from itertools import combinations
setrecursionlimit(100000)

INF = int(1e10)
MOD = int(1e9 + 7)

def main():
    from builtins import int, map
    N = int(input())
    S = [input() for _ in range(N)]
    S = Counter(S)
    print("AC x {}".format(S["AC"]))
    print("WA x {}".format(S["WA"]))
    print("TLE x {}".format(S["TLE"]))
    print("RE x {}".format(S["RE"]))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    s = input()
    if s == 'AC':
        ac += 1
    if s == 'WA':
        wa += 1
    if s == 'TLE':
        tle += 1
    if 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 Counter

C = Counter(input() for _ in range(int(input())))

for w in 'AC WA TLE RE'.split():
	print(w, 'x', C[w])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict, deque
from heapq import heappush, heappop
from itertools import permutations, accumulate
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)]
    ke = ["AC", "WA", "TLE", "RE"]
    d = {k:0 for k in ke}
    for i in s:
        d[i] += 1
    for k in ke:
        print(k+" x "+str(d[k]))
    return

#Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from collections import deque
from functools import lru_cache
import bisect
import re
import queue
import decimal


class Scanner():
    @staticmethod
    def int():
        return int(sys.stdin.readline().rstrip())

    @staticmethod
    def string():
        return sys.stdin.readline().rstrip()

    @staticmethod
    def map_int():
        return [int(x) for x in Scanner.string().split()]

    @staticmethod
    def string_list(n):
        return [Scanner.string() for i in range(n)]

    @staticmethod
    def int_list_list(n):
        return [Scanner.map_int() for i in range(n)]

    @staticmethod
    def int_cols_list(n):
        return [Scanner.int() for i in range(n)]


class Math():
    @staticmethod
    def gcd(a, b):
        if b == 0:
            return a
        return Math.gcd(b, a % b)

    @staticmethod
    def lcm(a, b):
        return (a * b) // Math.gcd(a, b)

    @staticmethod
    def divisor(n):
        lower, upper = [], []
        i = 1
        while i * i <= n:
            if n % i == 0:
                lower.append(i)
                if i != n // i:
                    upper.append(n // i)
            i += 1
        return lower + upper[::-1]

    @staticmethod
    def round_up(a, b):
        return -(-a // b)

    @staticmethod
    def is_prime(n):
        if n < 2:
            return False
        if n == 2:
            return True
        if n % 2 == 0:
            return False
        d = int(n ** 0.5) + 1
        for i in range(3, d + 1, 2):
            if n % i == 0:
                return False
        return True

    @staticmethod
    def fact(N):
        res = {}
        tmp = N
        for i in range(2, int(N ** 0.5 + 1) + 1):
            cnt = 0
            while tmp % i == 0:
                cnt += 1
                tmp //= i
            if cnt > 0:
                res[i] = cnt
        if tmp != 1:
            res[tmp] = 1
        if res == {}:
            res[N] = 1
        return res


def pop_count(x):
    x = x - ((x >> 1) & 0x5555555555555555)
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)
    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f
    x = x + (x >> 8)
    x = x + (x >> 16)
    x = x + (x >> 32)
    return x & 0x0000007f


def solve():
    N = Scanner.int()
    S = defaultdict(int)
    for _ in range(N):
        x = Scanner.string()
        S[x] += 1
    for s in ['AC', 'WA', 'TLE', 'RE']:
        print(s, "x", S[s])


def main():
    # sys.setrecursionlimit(1000000)
    # sys.stdin = open("sample.txt")
    # T = Scanner.int()
    # for _ in range(T):
    #     solve()
    # print('YNeos'[not solve()::2])
    solve()


if __name__ == "__main__":
    main()