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:
#!/usr/bin/env python
import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import (
    accumulate, combinations, combinations_with_replacement, groupby,
    permutations, product)
from math import (
    acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians,
    sin, sqrt, tan)
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits


def inp():
    return(int(input()))


def inlist():
    return(list(map(int, input().split())))


def instr():
    s = input()
    return(list(s[:len(s)]))


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


def main():
    n = inp()
    count = defaultdict(lambda: 0)
    for _ in range(n):
        t = input()
        count[t] += 1
    for i in ['AC', 'WA', 'TLE', 'RE']:
        print(i, "x", count[i])


# region fastio
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)
def input(): return sys.stdin.readline().rstrip("\r\n")

# endregion


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(N):
  a = str(input())
  if a == 'AC':
    c0 += 1
  elif a == 'WA':
    c1 += 1
  elif a == '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:
f = {"AC":0, "WA":0, "TLE":0,"RE":0}
for i in range(int(input())):
    s = input()
    f[s]+=1
for i in f:
    print(i,"x", f[i])

Submission status: Accepted

Solution code:
import itertools
from collections import deque,defaultdict,Counter
from itertools import accumulate
import bisect
from heapq import heappop,heappush,heapify
import math
from copy import deepcopy
import queue
#import numpy as np
# sympy as syp(素因数分解とか)
Mod = 1000000007
fact = [1, 1]
factinv = [1, 1]
inv = [0, 1] 
for i in range(2, 10**5 + 1):
    fact.append((fact[-1] * i) % Mod)
    inv.append((-inv[Mod % i] * (Mod // i)) % Mod)
    factinv.append((factinv[-1] * inv[-1]) % Mod)
    
def cmb(n, r, p):
    if (r < 0) or (n < r):
        return 0
    r = min(r, n - r)
    return fact[n] * factinv[r] * factinv[n - r] % p
    
def sieve_of_eratosthenes(n):
    if not isinstance(n,int):
        raise TypeError("n is not int")
    if n<2:
        raise ValueError("n is not effective")
    prime = [1]*(n+1)
    for i in range(2,int(math.sqrt(n))+1):
        if prime[i] == 1:
            for j in range(2*i,n+1):
                if j%i == 0:
                    prime[j] = 0
    res = []
    for i in range(2,n+1):
        if prime[i] == 1:
            res.append(i)
    return res

 
class UnionFind:
    def __init__(self,n):
        self.parent = [i for i in range(n+1)]
        self.rank = [0 for i in range(n+1)]
    
    def findroot(self,x):
        if x == self.parent[x]:
            return x
        else:
            y = self.parent[x]
            y = self.findroot(self.parent[x])
            return y
    
    def union(self,x,y):
        px = self.findroot(x)
        py = self.findroot(y)
        if px < py:
            self.parent[y] = px
        else:
            self.parent[px] = py
 
    def same_group_or_no(self,x,y):
        return self.findroot(x) == self.findroot(y)
import string
def main():  #startline-------------------------------------------
    state = ["AC", "WA", "TLE", "RE"]
    n = int(input())
    s = [input() for i in range(n)]
    for i in range(4):
        print(state[i]+" "+"x"+" "+str(s.count(state[i])))
    
if __name__ == "__main__":
    main() #endline===============================================

Submission status: Accepted

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

for _ in range(n):
    a = input()
    ans[a] += 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:
n = int(input())
ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for a in range(n):
    ans[input()] += 1

for a, b in ans.items():
    print(a, 'x', b)

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 ' + str(ac))
print('WA x ' + str(wa))
print('TLE x ' + str(tle))
print('RE x ' + str(re))

Submission status: Accepted

Solution code:
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())
RES = dict()
RES["AC"] = 0
RES["WA"] = 0
RES["TLE"] = 0
RES["RE"] = 0
for i in range(N):
    s = input()
    RES[s] += 1
for key,value in RES.items():
    print(key,"x",value)

Submission status: Accepted

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

N=int(input().rstrip('\n'))
dict = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(N):
  x = input().rstrip('\n')
  dict[x] += 1
res = '{} x {}'
print(res.format('AC',dict['AC']))
print(res.format('WA',dict['WA']))
print(res.format('TLE',dict['TLE']))
print(res.format('RE',dict['RE']))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for n 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:
from collections import Counter


def main():
    n = int(input())
    cnt = Counter()
    for _ in range(n):
        s = input()
        cnt[s] += 1
    for j in ('AC', 'WA', 'TLE', 'RE'):
        print(f'{j} x {cnt[j]}')


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
from collections import Counter
N=int(sys.stdin.readline().strip())
S=[ sys.stdin.readline().strip() for _ in range(N) ]
C=Counter(S)

for x in ("AC","WA","TLE","RE"):
    print x,"x",C[x]

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

l = []
for i in range(N):
    l.append(input())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sun Jul  5 21:03:34 2020

@author: NEC-PCuser
"""

N = int(input())

a = [0,0,0,0]

for i in range(N):
    s = input()
    if s == 'AC':
        a[0] += 1
    elif s == 'WA':
        a[1] += 1
    elif s == 'TLE':
        a[2] += 1
    elif s == 'RE':
        a[3] += 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())
s = [0]*4
for i in range(n):
    x = input()
    if x == "AC":
        s[0] += 1
    elif x == "WA":
        s[1] += 1
    elif x == "TLE":
        s[2] += 1

    else:
        s[3] += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from collections import Counter

N = int(sys.stdin.readline().rstrip())

S = []
for _ in range(N):
    S.append(sys.stdin.readline().rstrip())

c = Counter(S)

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

Submission status: Accepted

Solution code:
n = int(input())

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

for k, v in d.items():
    print(f'{k} x {v}')

Submission status: Accepted

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

import collections
c = collections.Counter(l)

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

Submission status: Accepted

Solution code:
def LI(): return list(map(int, input().split()))
def I(): return map(int, input().split())
mod = 10**9 + 7

def main():
  n = int(input())
  ac, wa, tle, re = 0,0,0,0
  s = []
  for _ 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', ac)
  print('WA x', wa)
  print('TLE x', tle)
  print('RE x', re)

  
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
a = [input() for i in range(n)]
b = Counter(a)
b.setdefault("AC", 0)
b.setdefault("WA", 0)
b.setdefault("TLE", 0)
b.setdefault("RE", 0)
print("AC" + " x " + str(b["AC"]))
print("WA" + " x " + str(b["WA"]))
print("TLE" + " x " + str(b["TLE"]))
print("RE" + " x " + str(b["RE"]))

Submission status: Accepted

Solution code:
from collections import Counter


def main():
    n = int(input())
    S = [input() for i in range(n)]

    CS = Counter(S)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
from collections import Counter 
def main():
    N = int(input())
    s = []
    for _ in range(N):
        s.append(input())
    dd = Counter(s)
    print('AC x ' + str(dd['AC']))
    print('WA x ' + str(dd['WA']))
    print('TLE x ' + str(dd['TLE']))
    print('RE x ' + str(dd['RE']))
if __name__ == '__main__':
    main()

Submission status: Accepted

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

ans = NList.count("AC")
print("AC x ", str(ans))
ans = NList.count("WA")
print("WA x ", str(ans))
ans = NList.count("TLE")
print("TLE x ", str(ans))
ans = NList.count("RE")
print("RE x ", str(ans))

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())
S = list(input() for _ in range(n))

for i in ['AC', 'WA', 'TLE', 'RE']:
    print(i + ' x ' + str(S.count(i)))

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for _ 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])

main()

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    S = [input() for _ in range(N)]
    import collections
    cnter = collections.Counter(S)
    for k in ["AC", "WA", "TLE", "RE"]:
        cnt = 0 if k not in cnter else cnter[k]
        print("{} x {}".format(k, cnt))
    
if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())
S = [None] * N
for i in range(N):
    s = input()
    S[i] = s

counter = Counter(S)

cases = ["AC", "WA", "TLE", "RE"]
for case in cases:
    if case in counter:
        print(f"{case} x {counter[case]}")
    else:
        print(f"{case} x 0")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
    get = input()
    if get == "AC":
        ac += 1
    if get == "WA":
        wa += 1
    if get == "TLE":
        tle +=1
    if get =="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())
t = [0,0,0,0]#AC,WA,TLE,RE
for i in range(n):
    s = input()
    if(s == 'AC'):
        t[0] += 1
    elif(s == 'WA'):
        t[1] += 1
    elif(s == 'TLE'):
        t[2] += 1
    else:
        t[3] += 1
print('AC x '+ str(t[0]))
print('WA x '+ str(t[1]))
print('TLE x '+ str(t[2]))
print('RE x '+ str(t[3]))

Submission status: Accepted

Solution code:
N = int(input())
ans = [0] * 4
m = {'AC': 0, 'WA': 1, 'TLE': 2, 'RE': 3}
for _ in range(N):
    k = input()
    ans[m[k]] += 1
for key in ['AC', 'WA', 'TLE', 'RE']:
    print(key, 'x', ans[m[key]])

Submission status: Accepted

Solution code:
N = int(input())
ans1 = 0
ans2 = 0
ans3 = 0
ans4 = 0
for i in range(N):
  s = input()
  if s[0] == "A":
    ans1 += 1
  elif s[0] == "W":
    ans2 += 1
  elif s[0] == "T":
    ans3 += 1
  elif s[0] == "R":
    ans4 += 1
    
print("AC x "+str(ans1))
print("WA x "+str(ans2))
print("TLE x "+str(ans3))
print("RE x "+str(ans4))

Submission status: Accepted

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

Submission status: Accepted

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

print('AC x', sli.count('AC'))
print('WA x', sli.count('WA'))
print('TLE x', sli.count('TLE'))
print('RE x', sli.count('RE'))

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
  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())
c0,c1,c2,c3 = 0,0,0,0
for _ in range(N):
    s = input()
    if s == "AC":
        c0 += 1
    elif s == "WA":
        c1 += 1
    elif s == "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())
S = [input() for _ in range(N)]
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
    if S[i]=="AC":
        AC=AC+1
    if S[i]=="WA":
        WA=WA+1
    if S[i]=="TLE":
        TLE=TLE+1
    if S[i]=="RE":
        RE=RE+1
print("AC x",AC)
print("WA x",WA)
print("TLE x",TLE)
print("RE x",RE)

Submission status: Accepted

Solution code:
def main():
    import collections
    N = int(input())
    Sn = [input() for i in range(N)]
    c = collections.Counter(Sn)
    #print(Sn)
    #print(c)

    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())
a = 0
w = 0
t = 0
r = 0
for i in range(N):
    x = input()
    if x == "AC":
        a += 1
    elif x == "WA":
        w += 1
    elif x == "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:
import collections

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

c = collections.Counter(s)

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

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
    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())
ans=['AC x ','WA x ','TLE x ','RE x ']
arr=[0]*4
for i in range(n):
  s=str(input())
  if s=='AC':
    arr[0]+=1
  elif s=='WA':
    arr[1]+=1
  elif s=='TLE':
    arr[2]+=1
  else:
    arr[3]+=1
for k in range(4):
  print(ans[k]+str(arr[k]))

Submission status: Accepted

Solution code:
def main():
    M = int(input())
    S = [list(input().split()) for i in range(M)]
    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"])))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())

l = [input() for _ in range(n)]

c = Counter(l)

for i in ['AC','WA','TLE','RE']:
    print(f'{i} x {c[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
    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:
# import sys;input = lambda : sys.stdin.readline()
import collections
d=collections.defaultdict(lambda:0)
for _ in range(int(input())):
    s=input()
    d[s]+=1
print("AC x",d['AC'])
print("WA x",d['WA'])
print("TLE x",d["TLE"])
print("RE x",d['RE'])

Submission status: Accepted

Solution code:
n = int(input())
a = w = t = 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
    
ans = f"""AC x {a}
WA x {w}
TLE x {t}
RE x {r}"""

print(ans)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

n = int(input())

result = []
for _ in range(n):
    result.append(input().strip())

from collections import Counter
c = Counter(result)

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = []
for _ in range(N):
  S.append(input())
c = Counter(S)

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

Submission status: Accepted

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

for item in items:
    print("{} x {}".format(item, results[item]))

Submission status: Accepted

Solution code:
n=int(input())
s=[input() for _ in range(n)]
ans={'AC':0,'WA':0,'TLE':0,'RE':0}
for si in s:
    ans[si]+=1
# print(ans)
for key in ans:
    print(f'{key} x {ans[key]}')

Submission status: Accepted

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

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+=1
  if s=="WA":
    w+=1
  if s=="TLE":
    t+=1
  if 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:
N = int(input())
X = [0,0,0,0]
for n in range(N):
    x = input()
    if x == 'AC':
        X[0] += 1
    elif x == 'WA':
        X[1] += 1
    elif x == '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
import sys
from collections import Counter

input = sys.stdin.readline


def S():
    return input().rstrip()


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


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


n = I()
sl = [S() for _ in range(n)]

c = Counter(sl)
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:
def resolve():
    import sys
    sys.setrecursionlimit(10 ** 6)  # 再帰関数の再帰の深さを設定
    to_index = lambda x: int(x) - 1  # 入力した数字に1を引いたものを返す
    print_list_in_2D = lambda x: print(*x, sep="\n")  # リストの要素を改行を挟んで表示する関数

    # 入力を整数に変換して受け取る
    def input_int(): return int(input())

    def map_int_input(): return map(int, input())

    MII = map_int_input

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

    def MII_to_index(): return map(to_index, input())

    def MII_split_to_index(): return map(to_index, input().split())

    # 入力全てを整数に変換したものの配列を受け取る
    def list_int_inputs(): return list(map(int, input()))

    LII = list_int_inputs

    def LII_split(): return list(map(int, input().split()))

    # 2次元リスト化
    def LII_2D(rows_number): return [LII() for _ in range(rows_number)]

    def LII_split_2D(rows_number): return [LII_split() for _ in range(rows_number)]

    N = input_int()
    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(f'{k} x {v}')

resolve()

Submission status: Accepted

Solution code:
# 2020/07/05
# AtCoder Beginner Contest 173 - B

# Input
n = int(input())
d = dict()
d['AC'] = 0
d['WA'] = 0
d['TLE'] = 0
d['RE'] = 0

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

# Output
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:
def main():
    N=int(input())
    ac=0
    wa=0
    tle=0
    re=0
    for _ in range(N):
        i=input()
        if i=='AC': ac+=1
        elif i=='WA': wa+=1
        elif i=='TLE': tle+=1
        elif i=='RE': re+=1
    print(f'AC x {ac}')
    print(f'WA x {wa}')
    print(f'TLE x {tle}')
    print(f'RE x {re}')
    return

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=[str(input())for i in range(N)]
AC=0
WA=0
TLE=0
RE=0
for j in S:
    if j =='AC':
        AC+=1
    elif j=='WA':
        WA+=1
    elif j=='TLE':
        TLE+=1
    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)] 

print('AC x %d' %s.count('AC'))
print('WA x %d' %s.count('WA'))
print('TLE x %d' %s.count('TLE'))
print('RE x %d' %s.count('RE'))

Submission status: Accepted

Solution code:
n = int(input())
ls = [0]*4
for i in range(n):
  s = input()
  if s=="AC":
    ls[0]+=1
  elif s=="WA":
    ls[1]+=1
  if s=="TLE":
    ls[2]+=1
  if s=="RE":
    ls[3]+=1
print("AC x {}".format(ls[0]))
print("WA x {}".format(ls[1]))
print("TLE x {}".format(ls[2]))
print("RE x {}".format(ls[3]))

Submission status: Accepted

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

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

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


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

Submission status: Accepted

Solution code:
from sys import stdin
from collections import defaultdict
input = stdin.readline

N = int(input())

d = defaultdict(int)

for _ in range(N):
    S = input().rstrip()
    d[S] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
ans = {"AC":0, "WA":0, "TLE":0, "RE":0}
for i in range(n):
    s = input()
    ans[s] += 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:
N=int(input())
lis=[0,0,0,0]
for _ in range(N):
    S=str(input())
    if S=="AC":
        lis[0]+=1
    elif S=="WA":
        lis[1]+=1
    elif S=="TLE":
        lis[2]+=1
    elif S=="RE":
        lis[3]+=1
print("AC x "+str(lis[0]))
print("WA x "+str(lis[1]))
print("TLE x "+str(lis[2]))
print("RE x "+str(lis[3]))

Submission status: Accepted

Solution code:
import sys,queue,math,copy,itertools,bisect,collections,heapq

def main():
    sys.setrecursionlimit(10**7)
    INF = 10**18
    MOD = 10**9 + 7
    LI = lambda : [int(x) for x in sys.stdin.readline().split()]
    _LI = lambda : [-int(x) for x in sys.stdin.readline().split()]
    NI = lambda : int(sys.stdin.readline())
    SI = lambda : sys.stdin.readline().rstrip()
    DD = ((1,0),(0,1),(-1,0),(0,-1))

    N = NI()
    d = {}
    for _ in range(N):
        S = input()
        if S in d:
            d[S] += 1
        else:
            d[S] = 1
    print('AC x ',d.get('AC',0))
    print('WA x ',d.get('WA',0))
    print('TLE x ',d.get('TLE',0))
    print('RE x ',d.get('RE',0))



if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import collections
n=int(input())
s=[input() for _ in range(n)]
c=collections.Counter(s)
for i in ["AC","WA","TLE","RE"]:
    print(f"{i} x {c[i]}")

Submission status: Accepted

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

    for result, num in results.items():
        print("{} x {}".format(result, num))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
a=0
b=0
c=0
d=0
for i in range(n):
  s=input()
  if s=="AC":
    a+=1
  elif s=="WA":
    b+=1
  elif s=="TLE":
    c+=1
  elif s=="RE":
    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())
sn = [input() for _ in range(n)]

ls = [0, 0, 0, 0]

for s in sn:
    if s == 'AC':
        ls[0] += 1
    elif s == 'WA':
        ls[1] += 1
    elif s == 'TLE':
        ls[2] += 1
    else:
        ls[3] += 1

l = ['AC', 'WA', 'TLE', 'RE']
for i in range(4):
    print(l[i], 'x', ls[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input(''))
c0=0 # AC
c1=0 # WA
c2=0 # TLE
c3=0 # RE
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:
ans=[]
for i in range(int(input())):
    ans.append(input())
print('AC x', ans.count('AC'))
print('WA x', ans.count('WA'))
print('TLE x', ans.count('TLE'))
print('RE x', ans.count('RE'))

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
  s = input()
  if s == 'AC':
    AC += 1
  elif s == 'WA':
    WA += 1
  elif s == 'TLE':
    TLE += 1
  else:
    RE += 1
    
print("AC x {}".format(AC))
print("WA x {}".format(WA))
print("TLE x {}".format(TLE))
print("RE x {}".format(RE))

Submission status: Accepted

Solution code:
n = int(input())

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

print("AC x {}".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:
x = int(input())
A = [input() for i in range(x)]

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

for a in A:
    if a=='AC':
        ac+=1
    if a=='WA':
        wa+=1
    if a=='TLE':
        tle+=1
    if a=='RE':
        re+=1

print('AC x '+str(ac))
print('WA x '+str(wa))
print('TLE x '+str(tle))
print('RE x '+str(re))