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

Solution (Python):
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))

Solution (Python):
import collections
N = int(input())
S = list(input() for _ in range(N))
A = collections.Counter(S)

B = ["AC","WA","TLE","RE"]
for i in B:
    print(i+" x "+str(A[i]))

Solution (Python):
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']}")

Solution (Python):
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']))

Solution (Python):
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"])

Solution (Python):
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]))

Solution (Python):
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]))

Solution (Python):
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")))

Solution (Python):

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

Solution (Python):
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']))

Solution (Python):



from fractions import gcd
from itertools import combinations,permutations,accumulate 

from collections import deque,defaultdict,Counter
import decimal
import re











import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

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)

Solution (Python):
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')))

Solution (Python):
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()

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): 
	return list(map(int,input().split()))
def m(): 
	return map(int,input().split())
def onem(): 
	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): 
	return " ".join(map(str,x))
def max2(x): 
	return max(map(max,x))
def In(x,a): 
    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]))

Solution (Python):
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}")

Solution (Python):
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]))

Solution (Python):
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])

Solution (Python):
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()

Solution (Python):
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"])

Solution (Python):
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()

Solution (Python):
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'])

Solution (Python):
import math

import queue
from collections import deque,defaultdict
import heapq as hpq
from sys import stdin,setrecursionlimit


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

Solution (Python):


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

Solution (Python):
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)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)

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







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

Solution (Python):
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]))

Solution (Python):
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)

Solution (Python):
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)

Solution (Python):
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']))

Solution (Python):
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]))

Solution (Python):
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])

Solution (Python):


'''
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



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




if __name__ == '__main__':
    main()

Solution (Python):
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")))

Solution (Python):
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'])

Solution (Python):
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}")

Solution (Python):
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)

Solution (Python):
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()

Solution (Python):
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"]))

Solution (Python):
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]))

Solution (Python):
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"))

Solution (Python):
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)

Solution (Python):
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])

Solution (Python):

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

Solution (Python):
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))

Solution (Python):
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()

Solution (Python):

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

Solution (Python):
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])

Solution (Python):
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])

Solution (Python):
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))

Solution (Python):



def main():
    import sys
    sys.setrecursionlimit(10**6)
    

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

Solution (Python):
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])

Solution (Python):
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])

Solution (Python):
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 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))

Solution (Python):
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()

Solution (Python):
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)

Solution (Python):
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])

Solution (Python):
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")))

Solution (Python):
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])

Solution (Python):

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


if __name__ == "__main__":
    solve()

Solution (Python):

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():
    
    
    
    
    
    
    solve()


if __name__ == "__main__":
    main()

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
import heapq
from collections import defaultdict
from collections import deque
from collections import Counter
from functools import lru_cache





MOD = 10**9+7
INF = float('inf')
AZ = "abcdefghijklmnopqrstuvwxyz"






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n): return kaijo_memo[n]
  if(len(kaijo_memo) == 0): kaijo_memo.append(1)
  while(len(kaijo_memo) <= n): kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n): return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0): gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n): gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if n == r: return 1
  if n < r or r < 0: return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1: arr.append([temp, 1])
  if arr==[]: arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def make_primes(N):
  max = int(math.sqrt(N))
  seachList = [i for i in range(2,N+1)]
  primeNum = []
  while seachList[0] <= max:
    primeNum.append(seachList[0])
    tmp = seachList[0]
    seachList = [i for i in seachList if i % tmp != 0]
  primeNum.extend(seachList)
  return primeNum


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


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


def count_bit(n):
  count = 0
  while n:
    n &= n-1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n: return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i-1])*n**i for i in range(len(str(X))))

def base_10_to_n_without_0(X, n):
  X -= 1
  if X//n: return base_10_to_n_without_0(X//n, n)+[X%n]
  return [X%n]


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





N = I()
dic = DD(int)
for _ in range(N):
  dic[S()] += 1
print("AC x",dic["AC"])
print("WA x",dic["WA"])
print("TLE x",dic["TLE"])
print("RE x",dic["RE"])

Solution (Python):
N = int(input())
a,t,w,r = 0,0,0,0
for i in range(N):
	s = input()
	if(s == 'AC'):
		a += 1
	if(s == 'RE'):
		r += 1
	if(s == 'TLE'):
		t += 1
	if(s == 'WA'):
		w += 1
print('AC x',a)
print('WA x',w)
print('TLE x',t)
print('RE x',r)

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

Solution (Python):
n = int(input())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
    s = input()
    d[s] += 1
for k, v in d.items():
    print(k, 'x', v)

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

labels = ['AC', 'WA', 'TLE', 'RE']
for label in labels:
    print(label, 'x', cnt[label])

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

Solution (Python):
from collections import Counter
def main():
    N = int(input())
    T = {}
    for _ in range(N):
        S = input()
        T[S] = T.get(S, 0) + 1
    for i in ['AC', 'WA', 'TLE', 'RE']:
        print(i + ' x', T.get(i, 0))

main()

Solution (Python):



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