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:

# Author : raj1307 - Raj Singh
# Date   : 05.07.2020

from __future__ import division, print_function

import os,sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


def ii():  return int(input())
def si():  return input()
def mi():  return map(int,input().strip().split(" "))
def msi(): return map(str,input().strip().split(" "))
def li():  return list(mi())

def dmain():
    sys.setrecursionlimit(1000000)
    threading.stack_size(1024000)
    thread = threading.Thread(target=main)
    thread.start()
    
#from collections import deque, Counter, OrderedDict,defaultdict
#from heapq import nsmallest, nlargest, heapify,heappop ,heappush, heapreplace
#from math import log,sqrt,factorial,cos,tan,sin,radians
#from bisect import bisect,bisect_left,bisect_right,insort,insort_left,insort_right
#from decimal import *
#import threading
#from itertools import permutations
#Copy 2D list  m = [x[:] for x in mark] .. Avoid Using Deepcopy

abc='abcdefghijklmnopqrstuvwxyz'
abd={'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
mod=1000000007
#mod=998244353
inf = float("inf")
vow=['a','e','i','o','u']
dx,dy=[-1,1,0,0],[0,0,1,-1]
def getKey(item): return item[1] 
def sort2(l):return sorted(l, key=getKey,reverse=True)
def d2(n,m,num):return [[num for x in range(m)] for y in range(n)]
def isPowerOfTwo (x): return (x and (not(x & (x - 1))) )
def decimalToBinary(n): return bin(n).replace("0b","")
def ntl(n):return [int(i) for i in str(n)]
def ncr(n,r): return factorial(n)//(factorial(r)*factorial(max(n-r,1)))

def ceil(x,y):
    if x%y==0:
        return x//y
    else:
        return x//y+1

def powerMod(x,y,p):
    res = 1
    x %= p
    while y > 0:
        if y&1:
            res = (res*x)%p
        y = y>>1
        x = (x*x)%p
    return res

def gcd(x, y):
    while y:
        x, y = y, x % y
    return x
    
def isPrime(n) : # Check Prime Number or not 
    if (n <= 1) : return False
    if (n <= 3) : return True
    if (n % 2 == 0 or n % 3 == 0) : return False
    i = 5
    while(i * i <= n) : 
        if (n % i == 0 or n % (i + 2) == 0) : 
            return False
        i = i + 6
    return True



def read():
    sys.stdin  = open('input.txt', 'r')  
    sys.stdout = open('output.txt', 'w') 




def main():
    


    #for _ in range(ii()):



    n=ii()

    x=0
    y=0
    r=0
    ss=0

    for i in range(n):
        s=si()
        if s=='AC':
            x+=1
        elif s=='TLE':
            y+=1
        elif s=='WA':
            r+=1
        else:
            ss+=1


    print('AC x',x)
    print('WA x',r)
    print('TLE x',y)
    print('RE x',ss)
















    








# region fastio
# template taken from https://github.com/cheran-senthil/PyRival/blob/master/templates/template.py

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


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")

# endregion


if __name__ == "__main__":
    #read()
    main()
    #dmain()

# Comment Read()

Submission status: Accepted

Solution code:
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
    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:
from collections import Counter
cases = ['AC','WA','TLE','RE']

n = int(input())
res = Counter(input().strip() for _ in range(n))

for case in cases:
    print(f"{case} x {res[case]}")

Submission status: Accepted

Solution code:
FAST_IO = 1
if FAST_IO:
    import io, sys, atexit
    rr = iter(sys.stdin.read().splitlines()).next
    sys.stdout = _OUTPUT_BUFFER = io.BytesIO()

    @atexit.register
    def write():
        sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
else:
    rr = raw_input
rri = lambda: int(rr())
rrm = lambda: map(int, rr().split())
rrmm = lambda n: [rrm() for _ in xrange(n)]


N = rri()
dic = {}
for i in range(N):
    tye = rr()
    dic[tye] = dic.get(tye, 0)+1
for tye in ("AC", "WA", "TLE", "RE"):
    print("{} x {}".format(tye, dic.get(tye, 0)))
'''
 AC x 3
WA x 1
TLE x 2
RE x 0

'''

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
d = dict()
d["AC"] = 0
d["WA"] = 0
d["RE"] = 0
d["TLE"] = 0

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
N = int(input())

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

c = collections.Counter(s)
d = dict(c)

m = ["AC", "WA", "TLE", "RE"]
for i in m:
    print(i, 'x', d.get(i,0))

Submission status: Accepted

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

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

    for s in S:
        if s == 'AC':
            ac += 1
        elif s == 'WA':
            wa += 1
        elif s == 'TLE':
            tle += 1
        else:
            re += 1

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

for key, val in dict.items():
    print("{0} x {1}".format(key, val))

Submission status: Accepted

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

from collections import Counter
count = Counter(ab)

ac = count["AC"]
wa = count["WA"]
tle =count["TLE"]
re = 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())
a1 = 0 #AC
a2 = 0 #WA
a3 = 0 #TLE
a4 = 0 #RE

for i in range(N):
  s = input()
  if s == 'AC':
    a1 += 1
  if s == 'WA':
    a2 += 1
  if s == 'TLE':
    a3 += 1
  if s == 'RE':
    a4 += 1

    
print("AC x {}".format(a1))
print("WA x {}".format(a2))
print("TLE x {}".format(a3))
print("RE x {}".format(a4))

Submission status: Accepted

Solution code:
n = int(input())

res = {}
res["AC"] = 0
res["WA"] = 0
res["TLE"] = 0
res["RE"] = 0

for _ in range(n):
    res[input()] += 1

print("AC x {}".format(res["AC"]))
print("WA x {}".format(res["WA"]))
print("TLE x {}".format(res["TLE"]))
print("RE x {}".format(res["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 ' + str(ans['AC']))
print('WA x ' + str(ans['WA']))
print('TLE x ' + str(ans['TLE']))
print('RE x ' + str(ans['RE']))

Submission status: Accepted

Solution code:
# coding: utf-8
#import numpy as np
import re
import math
from collections import defaultdict,deque,Counter
from fractions import Fraction
import bisect
import itertools
from itertools import accumulate
from copy import deepcopy
import heapq
import random
import time
import os
import sys
from functools import lru_cache,reduce
readline=sys.stdin.readline
sys.setrecursionlimit(100000)
alp="abcdefghijklmnopqrstuvwxyz"
numbers="0123456789"
mod=int(10**9+7)
inf=int(10**19)
class Set():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(bool)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        if not self.find(x):
            heapq.heappush(self.heap,x)
            self.dic[x]=True
            self.size+=1

    def remove(self,x):
        if self.find(x):
            self.dic[x]=False
            self.size-=1

    def find(self,x):
        return self.dic[x]
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==False:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class multiset():
    def __init__(self,A=[]):
        self.heap=[]
        self.dic=defaultdict(int)
        self.size=0
        for a in A:self.add(a)
    
    def __str__(self):
        return str(self.heap)
    
    def add(self,x):
        heapq.heappush(self.heap,x)
        self.dic[x]+=1
        self.size+=1

    def remove(self,x):
        if self.dic[x]>0:
            self.dic[x]-=1
            self.size-=1
    
    def count(self,x):
        return self.dic[x]

    def find(self,x):
        return self.dic[x]>0
    
    def top(self):
        while self.heap and self.dic[self.heap[0]]==0:
            heapq.heappop(self.heap)
        if self.heap:return self.heap[0]
        else:return None

    def pop(self):
        ret=None
        if self.heap:
            ret=self.top()
            self.remove(ret)
        return ret
class Edge():
    def __init__(self,x,y,val=1):
        self.x=x
        self.y=y
        self.val=val
class unionfind():
    def __init__(self,n):
        self.n=n
        self.P=[a for a in range(n)]
        self.rank=[0]*n
 
    def find(self,x):
        if(x!=self.P[x]):
            self.P[x]=self.find(self.P[x])
        return self.P[x]
 
    def same(self,x,y):
        return self.find(x)==self.find(y)
 
    def link(self,x,y):
        if self.rank[x]<self.rank[y]:
            self.P[x]=y
        elif self.rank[y]<self.rank[x]:
            self.P[y]=x
        else:
            self.P[x]=y
            self.rank[y]+=1
 
    def unite(self,x,y):
        self.link(self.find(x),self.find(y))
 
    def size(self):
        S=set()
        for a in range(self.n):
            S.add(self.find(a))
        return len(S)
def yn(b):print("yes" if b else "no")
def Yn(b):print("Yes" if b else "No")
def YN(b):print("YES" if b else "NO")
def ispow(a,b):
    now=b
    while now<a:
        now*=b
    return now==a
def getbin(num,size):
    A=[0]*size
    for a in range(size):
        if (num>>(size-a-1))&1==1:
            A[a]=1
        else:
            A[a]=0
    return A
def getfacs(n,mod_=0):
    A=[1]*(n+1)
    for a in range(2,len(A)):
        A[a]=A[a-1]*a
        if(mod_>0):A[a]%=mod_
    return A
def comb(n,r,mod,fac):
    if(n-r<0):return 0
    return (fac[n]*pow(fac[n-r],mod-2,mod)*pow(fac[r],mod-2,mod))%mod
def nextcomb(num,size):
    x=num&(-num)
    y=num+x
    z=num&(~y)
    z//=x
    z=z>>1
    num=(y|z)
    if(num>=(1<<size)):return False
    else:return num
def getprimes(n):
    if n==0:return []
    A=[True]*(n+1)
    A[0]=False
    A[1]=False
    for a in range(2,n+1):
        if A[a]:
            for b in range(a*2,n+1,a):
                A[b]=False
    ret=[]
    for a in range(n+1):
        if(A[a]):ret.append(a)
    return ret
def isprime(num):
    if(num<=1):return False
    i=2
    while i*i<=num:
       if(num%i==0):return False
       i+=1
    return True
def ifelse(b,t,f):return t if b else f
def factorize(n):
    b = 2
    ret=defaultdict(int)
    while b * b <= n:
        while n % b == 0:
            n //= b
            ret[b]+=1
        b+=1
    if n > 1:ret[n]+=1
    return ret
def inputintlist(row=1): 
    if row==1:
        ret=list(map(int,input().split()))
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=int(input())
    return ret
def inputfloatlist(row=1): 
    if row==1:
        ret=list(map(float,input().split()))
    else:
        ret=[None]*row
        for a in range(row):
            ret[a]=float(input())
    return ret
def istanchouzouka(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>=a:
            f=False
        prev=a
    return f
def istanchouhigensyou(A):
    f=True
    prev=min(A)-1
    for a in A:
        if prev>a:
            f=False
        prev=a
    return f
def getallsum(A):
    s=sum(A)
    dp=defaultdict(int)
    dp[0]=1
    for a in range(0,len(A)):
        for b in range(s,-1,-1):
            if b-A[a]>=0:
                dp[b]+=dp[b-A[a]]
    return dp
def yuukoutomukou(edges):
    ret=deepcopy(edges)
    for edge in edges:
        if not edge.x==edge.y:
            ret.append(Edge(edge.y,edge.x,edge.val))
    return ret
def dijkstra(edges,V,start):
    mincost=[inf]*V
    G=[[] for a in range(V)]
    for edge in edges:
        G[edge.x].append([edge.val,edge.y])
    Q=PriorityQueue()
    Q.put([0,start])#[cost,x]
    while not Q.empty():
        nowcost,nowx=Q.get()
        if mincost[nowx]==inf:
            mincost[nowx]=nowcost
            for cost,y in G[nowx]:
                newcost=nowcost+cost
                Q.put([newcost,y])
    return mincost
def warshallfloyd(edges,V):
    mincost=[[inf for b in range(V)] for a in range(V)]
    for a in range(V):mincost[a][a]=0
    for edge in edges:
        mincost[edge.x][edge.y]=min(mincost[edge.x][edge.y],edge.val)#x→yが複数ある場合のためにmin()する
    for k in range(V):
        for s in range(V):
            for t in range(V):
                if mincost[s][k]==inf or mincost[k][t]==inf:continue
                mincost[s][t]=min(mincost[s][t],mincost[s][k]+mincost[k][t])
    return mincost
def bellemanford(edges,V,start):
    mincost=[inf]*V
    mincost[start]=0
    for _ in range(V):
        for edge in edges:
            if mincost[edge.x]==inf:continue
            mincost[edge.y]=min(mincost[edge.y],mincost[edge.x]+edge.val)
    return mincost
def getmd(x1,y1,x2,y2):return abs(x1-x2)+abs(y1-y2)
def geted(x1,y1,x2,y2):return math.sqrt((x1-x2)**2+(y1-y2)**2)
class fordfulkerson():
    def __init__(self,edges,V,s,t):
        self.V=V
        self.used=[False]*V
        self.G=[[] for a in range(V)]
        self.s=s
        self.t=t
        for edge in edges:
            self.G[edge.x].append({"x":edge.x,"y":edge.y,"cap":edge.val,"rev":len(self.G[edge.y])})
            self.G[edge.y].append({"x":edge.y,"y":edge.x,"cap":0,"rev":len(self.G[edge.x])-1})
    def dfs(self,v,t,f=inf):
        if v==t:return f
        self.used[v]=True
        for a in range(len(self.G[v])):
            x=self.G[v][a]["x"]
            y=self.G[v][a]["y"]
            cap=self.G[v][a]["cap"]
            rev=self.G[y][self.G[x][a]["rev"]]
            if self.used[y] or cap==0:continue
            f2=self.dfs(y,t,min(f,cap))
            if f2>0:
                self.G[v][a]["cap"]-=f2
                rev["cap"]+=f2
                return f2
        return 0
    def maxflow(self):
        flow=0
        while True:
            self.used=[False]*V
            zouka=self.dfs(self.s,self.t)
            if zouka==0:break
            flow+=zouka
        return flow
def zipsort(*args):
    ziplist=sorted(zip(*args))
    for a in range(len(args)):
        for b in range(len(ziplist)):
            args[a][b]=ziplist[b][a]
def zipreverse(*args):
    ziplist=list(zip(*args))
    rev=[]
    for a in range(len(ziplist)-1,-1,-1):
        rev.append(ziplist[a])
    for a in range(len(args)):
        for b in range(len(rev)):
            args[a][b]=rev[b][a]

######################################################################################################
n=int(input())
S={}
S["AC"]=0
S["TLE"]=0
S["WA"]=0
S["RE"]=0
for a in range(n):
    S[input()]+=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:
def main():
    from collections import Counter
    n = int(input())
    s = [input() for _ in range(n)]
    c = Counter(s)
    p = lambda x: print(f'{x} x {c[x]}')
    p('AC')
    p('WA')
    p('TLE')
    p('RE')

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
array = []
for i in range(n):
    array.append(input())
ac = 0
wa =0
tle = 0
re = 0

for s in array:
    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())
l = ["AC","WA","TLE","RE"]
ans = [0,0,0,0]
for i in range(N):
    S = input()
    if(S == "AC"):
        ans[0] += 1
    if(S == "WA"):
        ans[1] += 1
    if(S == "TLE"):
        ans[2] += 1
    if(S == "RE"):
        ans[3] += 1

for i in range(4):
    print(l[i], " x ",ans[i])

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
d = {'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(n):
    s = ns()
    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:
import collections
n=int(input())
s=[input() for i 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"]))

Submission status: Accepted

Solution code:
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 " + 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)]
count  = [0, 0, 0, 0]
for i in s:
    if i == 'AC':count[0] += 1
    elif i == 'WA':count[1] += 1
    elif i == 'TLE':count[2] += 1
    else:count[-1] += 1

string = ['AC', 'WA', 'TLE', 'RE']
for i,j in zip(string, count):
    print(i, 'x', j)

Submission status: Accepted

Solution code:
n = int(input())
s = []

for _ in range(n):
  s.append(input())

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

Submission status: Accepted

Solution code:
import sys
import math
import collections
import decimal
import itertools
from collections import deque
from functools import reduce
import heapq
n = int(input())
#n, m, k = map(int, sys.stdin.readline().split())
#s = input()
#A = list(map(int, sys.stdin.readline().split()))

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:
# 
import sys

from sys import stdin
input = lambda: stdin.readline().rstrip()


N = int(input())
AC = 'AC'
WA = 'WA'
TLE = 'TLE'
RE = 'RE'
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 ' + 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
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
    elif s == "RE":
        RE += 1
print("AC x ",AC)
print("WA x ",WA)
print("TLE x ",TLE)
print("RE x ",RE)

Submission status: Accepted

Solution code:
N=int(input())
hoge=[0]*4
List=["AC","WA","TLE","RE"]
for i in range(N):
  s=input()
  hoge[List.index(s)]+=1
  
for i in range(4):
  print(List[i]+" x "+str(hoge[i]))

Submission status: Accepted

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

for key, val in cnt.items():
    print(key,"x",val)

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

Submission status: Accepted

Solution code:
from collections import defaultdict
middle = " x "
N = int(input())
dic = defaultdict(int)
for _ in range(N):
  key = input()
  dic[key] += 1

list_key = ["AC", "WA", "TLE", "RE"]
for item in list_key:
  print(item + middle + str(dic[item]))

Submission status: Accepted

Solution code:
from collections import Counter

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

c = Counter(s)
for res in ('AC', 'WA', 'TLE', 'RE'):
    print(f'{res} x {c[res]}')

Submission status: Accepted

Solution code:
a = [0,0,0,0]
n = int(input())
for i in range(n):
    m = input()
    if m == "AC":
        a[0] += 1
    elif m == "WA":
        a[1] += 1
    elif m == "TLE":
        a[2] += 1
    else:
        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 = [ input() for i in range(n) ]

from collections import Counter
sc = Counter(s)

x = ['AC', 'WA', 'TLE', 'RE']
for xx in x:
  print( '{} x {}'.format(xx, sc[xx]) )

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    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
        elif "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__":
    main()

Submission status: Accepted

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

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

for k,v in d.items():
    print (k, "x", v)

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
    else:
        d += 1

print("AC x " + str(a))
print("WA x " + str(b))
print("TLE x " + str(c))
print("RE x " + str(d))

Submission status: Accepted

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

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

for i in range(n):
    a = input()
    dic[a] += 1

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

Submission status: Accepted

Solution code:
ac,tle,wa,re=0,0,0,0
n = int(input())
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:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import sys
sys.setrecursionlimit(10**7)
from pprint import pprint as pp
from pprint import pformat as pf
# @pysnooper.snoop()
#import pysnooper # debug

import math
#from sortedcontainers import SortedList, SortedDict, SortedSet # no in atcoder
import bisect


if __name__ == '__main__':
    counter = {
            "AC": 0,
            "WA": 0,
            "TLE": 0,
            "RE": 0,
            }
    n = int(input())
    for _ in range(n):
        s = input()
        counter[s] += 1

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


    #print('\33[32m' + 'end' + '\033[0m') # debug

Submission status: Accepted

Solution code:
import collections 

n = int(input())
s = [ input() for _ in range(n)]
c = collections.Counter(s)
for case in ['AC', 'WA', 'TLE', 'RE']:
    print(case, 'x', c[case])

Submission status: Accepted

Solution code:
from collections import defaultdict
n=int(input())
d=defaultdict(int)
for i in range(n):
    s=input()
    d[s]+=1

print("AC x "+str(d["AC"]))

print("WA x "+str(d["WA"]))

print("TLE x "+str(d["TLE"]))

print("RE x "+str(d["RE"]))

Submission status: Accepted

Solution code:
N=int(input())
D=[input() for a in range(N)]
print(f"AC x {D.count('AC')}")
print(f"WA x {D.count('WA')}")
print(f"TLE x {D.count('TLE')}")
print(f"RE x {D.count('RE')}")

Submission status: Accepted

Solution code:
from collections import defaultdict

s = ["AC", "WA", "TLE", "RE"]
n = int(input())
cnt = defaultdict(int)
for i in range(n):
    x = input()
    cnt[x] += 1

for i in range(4):
    print(s[i], "x", cnt[s[i]])

Submission status: Accepted

Solution code:
# abc173_b.py
N = int(input())
M = [input() for i in range(N)]
ac=0
wa=0
tle=0
re=0
for i in M:
    if i =="AC":
        ac+=1
    if i =="WA":
        wa+=1
    if i =="TLE":
        tle+=1
    if i =="RE":
        re+=1
print("AC x",ac)
print("WA x",wa)
print("TLE x",tle)
print("RE x",re)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

def main():
    n=int(input())
    s=Counter(input() for _ in range(n))
    print("AC x", s["AC"])
    print("WA x", s["WA"])
    print("TLE x", s["TLE"])
    print("RE x", s["RE"])

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
def main():
    n = int(input())
    S = Counter()
    for _ in range(n):
        w = input()
        S[w]+=1
    
    A = ["AC","WA","TLE","RE"]
    for a in A:
        print(a+" x "+str(S[a]))
main()

Submission status: Accepted

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