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:
# ------------------- fast io --------------------
import os
import sys
from io import BytesIO, IOBase

BUFSIZE = 8192


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)
input = lambda: sys.stdin.readline().rstrip("\r\n")

# ------------------- fast io --------------------
from math import gcd, ceil

def pre(s):
    n = len(s)
    pi = [0] * n
    for i in range(1, n):
        j = pi[i - 1]
        while j and s[i] != s[j]:
            j = pi[j - 1]
        if s[i] == s[j]:
            j += 1
        pi[i] = j
    return pi


def prod(a):
    ans = 1
    for each in a:
        ans = (ans * each)
    return ans

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


def binary(x, length=16):
    y = bin(x)[2:]
    return y if len(y) >= length else "0" * (length - len(y)) + y

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

for _ in range(int(input()) if True else 1):
    #n, k = map(int, input().split())
    #a, b = map(int, input().split())
    #c, d = map(int, input().split())
    #a = list(map(int, input().split()))
    #b = list(map(int, input().split()))
    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 %d
WA x %d
TLE x %d
RE x %d'''% (ac, wa, tle, re))

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
words = Counter([input() for i in range(n)])

for i in ("AC", "WA", "TLE", "RE"):
    print(f"{i} x {words.get(i, 0)}")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
p = ['AC', 'WA', 'TLE', 'RE']
n = int(input())
r = []
for i in range(n):
    r.append(input())
for j in p:
    c = r.count(j)
    print('{} x {}'.format(j, c))

Submission status: Accepted

Solution code:
N = int(input().strip())

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

for i in range(N):
    s = input().strip()
    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())
AC=0
WA=0
TLE=0
RE=0
 
for k in range(N):
  K=input()
  if K=="AC":
    AC=AC+1
  if K=="WA":
    WA=WA+1
  if K=="TLE":
    TLE=TLE+1
  if K=="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:
from collections import defaultdict
import sys

dd=defaultdict(lambda:0)
n=int(input())
a=list(sys.stdin.read().split())
for aa in a:
  dd[aa]+=1
ANSL=["AC", "WA", "TLE", "RE"]

ans=""
for w in ANSL:
  ans+=f"{w} x {dd[w]}\n"
print(ans)

Submission status: Accepted

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

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

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 "+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)]
for v in ['AC', 'WA', 'TLE', 'RE']:
 print('{0} x {1}'.format(v, s.count(v)))

Submission status: Accepted

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

s = "AC x " + str(C[0]) + "\nWA x " + str(C[1]) + "\nTLE x " + str(C[2]) + "\nRE x " + str(C[3])
print(s)

Submission status: Accepted

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

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(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())
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())
C = [input() for i in range(N)]

AC_num = 0
WA_num = 0
TLE_num = 0
RE_num = 0

for c in C:
    if(c == "AC"):
        AC_num += 1
    elif(c == "WA"):
        WA_num += 1
    elif(c == "TLE"):
        TLE_num += 1
    elif(c == "RE"):
        RE_num += 1

print("AC x {}".format(AC_num))
print("WA x {}".format(WA_num))
print("TLE x {}".format(TLE_num))
print("RE x {}".format(RE_num))

Submission status: Accepted

Solution code:
n = int(input())
word_list = ['AC','WA','TLE','RE']
counter = [0,0,0,0]
for i in range(n):
    word = input()
    if word == 'AC':
        counter[0] += 1
    elif word == 'WA':
        counter[1] += 1
    elif word == 'TLE':
        counter[2] += 1
    elif word == 'RE':
        counter[3] += 1
    else:
        pass
for i in range(4):
    print(word_list[i] + ' x',counter[i])

Submission status: Accepted

Solution code:
N = int(input())
S = {}
for i in range(N):
    A = input()
    if A not in S:
        S[A] = 1
    else:
        S[A] += 1
Al = ['AC','WA','TLE','RE']
for i in range(4):
    if Al[i] in S:
        print(Al[i] +' x ' + str(S[Al[i]]))
    else:
        print(Al[i] +' x 0')

Submission status: Accepted

Solution code:
n = int(input())

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

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

cnds = ['AC', 'WA', 'TLE', 'RE']

for cnd in cnds:
    print(cnd, 'x', nums[cnd])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())

list = []
i = 0
for i in range(n):
  list.append(stdin.readline().rstrip())

AC = WA = TLE = RE = 0
for k in list:
  if k == 'AC':
    AC = AC + 1
  if k == 'WA':
    WA = WA + 1
  if k == 'TLE':
    TLE = TLE + 1
  if k == 'RE':
    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:
import sys
next(sys.stdin)
ct=dict(zip('AC WA TLE RE'.split(),[0]*4))
for ln in sys.stdin:
    ct[ln[:-1]]+=1
for k,v in ct.items():
    print(k,'x',v)

Submission status: Accepted

Solution code:
N = int(input())

num_ac = 0
num_wa = 0
num_tle = 0
num_re = 0

for _ in range(N):
    s = input()
    if s == "AC":
        num_ac += 1
    elif s == "WA":
        num_wa += 1
    elif s == "TLE":
        num_tle += 1
    elif s == "RE":
        num_re += 1


print(f"AC x {num_ac}")
print(f"WA x {num_wa}")
print(f"TLE x {num_tle}")
print(f"RE x {num_re}")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline

    RESULT = 'AC', 'WA', 'TLE', 'RE'

    N = int(input())

    ctr = [0] * 4
    for _ in range(N):
        s = input().rstrip()
        ind = RESULT.index(s)
        ctr[ind] += 1

    for key, cnt in zip(RESULT, ctr):
        print(f'{key} x {cnt}')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

next(sys.stdin)

ct=dict(zip('AC WA TLE RE'.split(),[0]*4))
for s in map(str.strip,sys.stdin):
    ct[s]+=1

for k,v in ct.items():
    print(k,'x',v)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N = int(input())

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

AC = int(0)
TLE = int(0)
WA = int(0)
RE = int(0)

for i in range(N):
    if list[i] == "AC":
        AC = AC + 1
    elif list[i] == "TLE":
        TLE = TLE + 1
    elif list[i] == "WA":
        WA = WA + 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:
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 " + str(ac))
print("WA x " + str(wa))
print("TLE x " + str(tle))
print("RE x " + str(re))

Submission status: Accepted

Solution code:
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for p in range(N):
    i = input()
    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:
N = int(input())
ac=0
wa=0
tle=0
re=0
for i in range(N):
    check = input()
    if check == "AC":
        ac+=1
    elif check == "WA":
        wa+=1
    elif check == "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:
ac=0
wa=0
tle=0
re=0
for _ in range(int(input())):
    s=input()
    if s=='AC':
        ac+=1
    elif s=='WA':
        wa+=1
    elif s=='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())
list = []
for i in range(N):
  list.append(input())

a = 0
w = 0
t = 0
r = 0
for i in range(N):
  if list[i] == "AC":
    a = a + 1
  elif list[i] == "WA":
    w = w + 1
  elif list[i] == "TLE":
    t = t + 1
  elif list[i] == "RE":
    r = 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())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    data = input()
    if data == "AC":
        ac += 1
    elif data == "WA":
        wa += 1
    elif data == "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())
STATUS_LIST = []
count_ac = 0
count_wa = 0
count_tle = 0
count_re = 0

for i in range(N):
    status = input()
    if status == "AC":
        count_ac += 1
    if status == "WA":
        count_wa += 1
    if status == "TLE":
        count_tle += 1
    if status == "RE":
        count_re += 1

print("AC x {}".format(count_ac))
print("WA x {}".format(count_wa))
print("TLE x {}".format(count_tle))
print("RE x {}".format(count_re))

Submission status: Accepted

Solution code:
N = int(input())
Ss = []
for i in range(N):
	Ss.append(input())
	
C0, C1, C2, C3 = 0, 0, 0, 0
for S in Ss:
	if S == 'AC':
		C0 += 1
	elif S == 'WA':
		C1 += 1
	elif S == 'TLE':
		C2 += 1
	else:
		C3 += 1
print("AC x {}".format(C0))
print("WA x {}".format(C1))
print("TLE x {}".format(C2))
print("RE x {}".format(C3))

Submission status: Accepted

Solution code:
n=int(input())
ans=[0]*4
for i in range(n):
  s=input()
  if s=='AC':
    ans[0]+=1
  elif s=='WA':
    ans[1]+=1
  elif s=='TLE':
    ans[2]+=1
  else:
    ans[3]+=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:
N = int(input())
count = dict(zip(['AC', 'WA', 'TLE', 'RE'], [0]*4))
for i in range(N):
  count[input()] += 1
for key in count:
  print('{} x {}'.format(key, count[key]))

Submission status: Accepted

Solution code:
N = int(input())
Ss = []
for i in range(N):
  Ss.append(input())
 
C0, C1, C2, C3 = 0, 0, 0, 0
for S in Ss:
  if S == 'AC':
    C0 += 1
  elif S == 'WA':
    C1 += 1
  elif S == 'TLE':
    C2 += 1
  else:
    C3 += 1
print("AC x {}".format(C0))
print("WA x {}".format(C1))
print("TLE x {}".format(C2))
print("RE x {}".format(C3))

Submission status: Accepted

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

for j in ["AC", "WA", "TLE", "RE"]:
  print("{} x {}".format(j, Ss.count(j)))

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:
list=[]
count=int(input())
for i in range(count):
    list.append(input())
print("AC"+" "+"x"+" "+str(list.count("AC")))
print("WA"+" "+"x"+" "+str(list.count("WA")))
print("TLE"+" "+"x"+" "+str(list.count("TLE")))
print("RE"+" "+"x"+" "+str(list.count("RE")))

Submission status: Accepted

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

Submission status: Accepted

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

C0 = Si.count('AC')
C1 = Si.count('WA')
C2 = Si.count('TLE')
C3 = Si.count('RE')

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

Submission status: Accepted

Solution code:
n=int(input())
s=[]
for i in range(n):
    s.append( input() )
t=["AC","WA","TLE","RE"]
c=[0,0,0,0]

for i in range(n):
    for j in range(4):
        if s[i]==t[j]:
            c[j]+=1

for j in range(4):
    print(t[j], "x",c[j])

Submission status: Accepted

Solution code:
loop_count = int(input())

ac_count = 0
wa_count = 0
tle_count = 0
re_count = 0

for i in range(loop_count):
    result = input()
    if result == 'AC':
        ac_count += 1
    elif result == 'WA':
        wa_count += 1
    elif result == 'TLE':
        tle_count += 1
    else:
        re_count += 1

print("AC x {0}".format(str(ac_count)))
print("WA x {0}".format(str(wa_count)))
print("TLE x {0}".format(str(tle_count)))
print("RE x {0}".format(str(re_count)))

Submission status: Accepted

Solution code:
AC = 0
WA = 0
TLE = 0
RE = 0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  num=str(input())
  if num=="AC":
    ac+=1
  elif num=="WA":
    wa+=1
  elif num=="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:
a = 0
w = 0
r = 0
t = 0
for _ in range(int(input())):
	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,*d = map(str, open(0).read().split())
AC,WA,TLE,RE=0,0,0,0

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

listA=[input() for i in range(n)]

d=dict(AC=0, WA=0, TLE=0, RE=0)

for s in listA:
  d[s]+=1
for k,v in d.items():
  print(k,'x',v)

Submission status: Accepted

Solution code:
m = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for _ in range(int(input())):
    k = input()
    m[k] = m[k] + 1

for k in ["AC", "WA", "TLE", 'RE']:
    print(f"{k} x {m[k]}")

Submission status: Accepted

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

for k 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=[]
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:
N = int(input())

in_str = ''

for n in range(N):
    in_str = in_str + input()

ans_ac = str(in_str.count('AC'))
ans_wa = str(in_str.count('WA'))
ans_tle = str(in_str.count('TLE'))
ans_re = str(in_str.count('RE'))

print('AC x ' + ans_ac)
print('WA x ' + ans_wa)
print('TLE x ' + ans_tle)
print('RE x ' + ans_re)

Submission status: Accepted

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

for v in ['AC', 'WA', 'TLE', 'RE']:
    print(f"{v} x {s.count(v)}")

Submission status: Accepted

Solution code:

if __name__ == '__main__':
    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 '+ 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 = []
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    s.append(input())

for i in range(n):
    if s[i] == "AC":
        ac += 1
    elif s[i] == "WA":
        wa += 1
    elif s[i] == "TLE":
        tle += 1
    else:
        re += 1

print("AC x ", end='')
print(ac)

print("WA x ", end='')
print(wa)

print("TLE x ", end='')
print(tle)

print("RE x ", end='')
print(re)

Submission status: Accepted

Solution code:
import math, sys
from collections import Counter
inputs = iter(sys.stdin.readlines())
n = int(next(inputs))
cnt = Counter([next(inputs).rstrip() for _ in range(n)])
print(f'AC x {cnt["AC"]}')
print(f'WA x {cnt["WA"]}')
print(f'TLE x {cnt["TLE"]}')
print(f'RE x {cnt["RE"]}')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(n):
    a = input()
    if a == "AC":
        c0 += 1
    elif a == "WA":
        c1 += 1
    elif a == "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:
N = int(input())
result = [0] * 4
for _ in range(N):
    S = input()
    if S == 'AC':
        result[0] += 1
    elif S == 'WA':
        result[1] += 1
    elif S == 'TLE':
        result[2] += 1
    elif S == 'RE':
        result[3] += 1
        
print('AC x {}'.format(result[0]))
print('WA x {}'.format(result[1]))
print('TLE x {}'.format(result[2]))
print('RE x {}'.format(result[3]))

Submission status: Accepted

Solution code:
n = int(input())
ac = wa = tle = 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 ' + 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())
c1=0
c2=0
c3=0
c4=0
for I in range(1, n+1):
    s = str(input())
    if(s == "AC"):
        c1+= 1
    elif(s == "WA"):
        c2+=1
    elif(s == "TLE"):
        c3+=1
    elif(s == "RE"):
        c4 +=1
print(f"AC x {c1}")
print(f"WA x {c2}")
print(f"TLE x {c3}")
print(f"RE x {c4}")

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:
#B - Judge status summary

import math
import sys
import itertools
from math import gcd
from math import sqrt
from sys import stdin
def input() : return stdin.readline().rstrip()
def mips():
    return map(int,input().split())
def ii():
    return int(input())
sys.setrecursionlimit(10**9)

N = int(input())
d = dict()
d["AC"] = 0
d["WA"] = 0
d["TLE"] = 0
d["RE"] = 0
for _ in range(N):
    s = input()
    d[s] += 1
for key,val in d.items():
    print(key + ' x ' + str(val))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

c0 = 0
c1 = 0
c2 = 0
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 {}'.format(c0))
print('WA x {}'.format(c1))
print('TLE x {}'.format(c2))
print('RE x {}'.format(c3))

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i in range(N):
    if S[i] == "AC":
        c0 = c0 + 1
    elif S[i] == "WA":
        c1 = c1 + 1
    elif S[i] == "TLE":
        c2 = c2 + 1
    else:
        c3 = 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:
import sys
import numpy as np
from math import ceil
from collections import defaultdict as D

def S(): return sys.stdin.readline().rstrip().split(' ')
def Ss(): return list(S())
def I(): return _I(Ss())
def Is(): return list(I())
def _I(ss): return map(int, ss) if len(ss) > 1 else int(ss[0])

d = D(int)
n = I()
for _ in range(n):
  s = S()[0]
  d[s] += 1

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

Submission status: Accepted

Solution code:
n=int(input())
l=[0,0,0,0]
for i in range(n):
  s=input()
  if(s=="AC"):
    l[0]+=1
  elif(s=="WA"):
    l[1]+=1
  elif(s=="TLE"):
    l[2]+=1
  else:
    l[3]+=1

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

Submission status: Accepted

Solution code:
N = int(input())
A = []
A = [input() for _ in range(N)]
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:
from collections import Counter


def solve(string):
    n, *s = string.split()
    c = Counter(s)
    return "\n".join(f"{k} x {c[k]}" for k in "AC WA TLE RE".split())


if __name__ == '__main__':
    import sys
    print(solve(sys.stdin.read().strip()))

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

a = [0]*N
for i in range(N):
    a[i]=input()

result=[0]*4
for i in range(len(a)):
    if a[i] == "AC":
        result[0]+=1

    if a[i] == "WA":
        result[1]+=1

    if a[i] == "TLE":
        result[2]+=1

    if a[i] == "RE":
        result[3]+=1

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

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 range(0,n):
    if s[i] == "AC":
        ac +=1
    elif s[i] == "WA":
        wa += 1
    elif s[i] == "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())

ans = [0, 0, 0, 0]

for i in range(n):
  s = input()
  if s == 'AC':
    ans[0] += 1
  elif s == 'WA':
    ans[1] += 1
  elif s == 'TLE':
    ans[2] += 1
  else:
    ans[3] += 1

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

Submission status: Accepted

Solution code:
import collections

N = int(input())
judgement = []
for i in range(N):
    judgement.append(input())
c = collections.Counter(judgement)

order = ["AC", "WA", "TLE", "RE"]
for ans in order:
    print(ans + " x " + str(c[ans]))

Submission status: Accepted

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

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())
S = [input() for i in range(N)]
AC, WA, TLE, RE = (0, 0, 0, 0)

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

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

Submission status: Accepted

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

enj = ['AC', 'WA', 'TLE', 'RE']
cnt = {res: 0 for res in enj}
for res in s:
    cnt[res] += 1
for res in enj:
    print('{} x {}'.format(res, cnt[res]))

Submission status: Accepted

Solution code:
N=int(input())
L = [0 for i in range(4)]
for i in range(N):
    s = input()
    if s=="AC":
        L[0] += 1
    elif s=="WA":
        L[1] += 1
    elif s == "TLE":
        L[2] += 1
    else:
        L[3] += 1

print("AC x"+" "+str(L[0]))
print("WA x"+" "+str(L[1]))
print("TLE x"+" "+str(L[2]))
print("RE x"+" "+str(L[3]))

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:
from collections import Counter
c = Counter([input().strip() for i in range(int(input()))])
s = ["AC", "WA", "TLE", "RE"]
for i in s:
  print(i + " x " + str(c[i]))