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:
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
    else:
        c[3] += 1

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

Submission status: Accepted

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

N = int(input())
list_result = [input() for i in range(N)]

AC_cnt = 0
WA_cnt = 0
TLE_cnt = 0
RE_cnt = 0


for i in list_result:
    if i == "AC\n":
        AC_cnt += 1

    elif i == "WA\n":
        WA_cnt += 1
    elif i == "TLE\n":
        TLE_cnt += 1

    elif i == "RE\n":
        RE_cnt += 1

print("AC x",AC_cnt ,"\n" "WA x",WA_cnt,"\n" "TLE x",TLE_cnt,"\n" "RE x",RE_cnt )

Submission status: Accepted

Solution code:
N = int(input()) #1行目のNを取得する
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())
S = [input() for i in range(N)]
print("AC x "+str( S.count("AC")))
print("WA x "+str( S.count("WA")))
print("TLE x "+str( S.count("TLE")))
print("RE x "+str( S.count("RE")))

Submission status: Accepted

Solution code:
n=int(input())
s=[0]*n
for i in range(n):
  s[i]=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:
n=int(input())
dic={'AC':0,'WA':0,'TLE':0,'TLE':0,'RE':0}
for i in range(n):
  dic[input()]+=1
for i in dic:
  print(i,'x',dic[i])

Submission status: Accepted

Solution code:
N, *S = open(0).read().split()
d = {
    'AC': 0,
    'WA': 0,
    'TLE': 0,
    'RE': 0,
}
for s in S:
    if s in d:
        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 math

q = int(input().strip())
count = {}
count['AC'] = 0
count['WA'] = 0
count['TLE'] = 0
count['RE'] = 0
for i in range(q):
    b = input().strip()
    count[b] += 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())
from collections import Counter
ss = []
for i in range(n):
    ss.append(input())
c = Counter(ss)
for w in ["AC", "WA", "TLE", "RE"]:
    if w in c.keys():
        print(f"{w} x {c[w]}")
    else:
        print(f"{w} x 0")

Submission status: Accepted

Solution code:
n = int(input())
s = [0] * n
for i in range(n):
    s[i] = 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:
N = int(input())
c_AC = 0
c_WA = 0
c_TLE = 0
c_RE = 0
for _ in range(N):
    X = input()
    if X == "AC":
        c_AC += 1
    if X == "WA":
        c_WA += 1
    if X == "TLE":
        c_TLE += 1 
    if X == "RE":
        c_RE += 1
       

print("AC "+"x "+str(c_AC))
print("WA "+"x "+str(c_WA))
print("TLE "+"x "+str(c_TLE))
print("RE "+"x "+str(c_RE))

Submission status: Accepted

Solution code:
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0

for _ in range(n):
  x = input()
  if x == 'AC':
    ac += 1
  elif x == 'WA':
    wa += 1
  elif x == '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:
result = []
for _ in range(int(input())):
  result.append(input())
print("AC x {}".format(result.count("AC")))
print("WA x {}".format(result.count("WA")))
print("TLE x {}".format(result.count("TLE")))
print("RE x {}".format(result.count("RE")))

Submission status: Accepted

Solution code:
import sys,bisect,string,math,time,functools,random,fractions
from heapq import heappush,heappop,heapify
from collections import deque,defaultdict,Counter
from itertools import permutations,combinations,groupby
rep=range
def Golf():n,*t=map(int,open(0).read().split())
def I():return int(input())
def S_():return input()
def IS():return input().split()
def LS():return [i for i in input().split()]
def MI():return map(int,input().split())
def LI():return [int(i) for i in input().split()]
def LI_():return [int(i)-1 for i in input().split()]
def NI(n):return [int(input()) for i in range(n)]
def NI_(n):return [int(input())-1 for i in range(n)]
def StoLI():return [ord(i)-97 for i in input()]
def ItoS(n):return chr(n+97)
def LtoS(ls):return ''.join([chr(i+97) for i in ls])
def RA():return map(int,open(0).read().split())
def GI(V,E,ls=None,Directed=False,index=1):
    org_inp=[];g=[[] for i in range(V)]
    FromStdin=True if ls==None else False
    for i in range(E):
        if FromStdin:
            inp=LI()
            org_inp.append(inp)
        else:
            inp=ls[i]
        if len(inp)==2:
            a,b=inp;c=1
        else:
            a,b,c=inp
        if index==1:a-=1;b-=1
        aa=(a,c);bb=(b,c);g[a].append(bb)
        if not Directed:g[b].append(aa)
    return g,org_inp
def GGI(h,w,search=None,replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1):
    #h,w,g,sg=GGI(h,w,search=['S','G'],replacement_of_found='.',mp_def={'#':1,'.':0},boundary=1) # sample usage
    mp=[boundary]*(w+2);found={}
    for i in range(h):
        s=input()
        for char in search:
            if char in s:
                found[char]=((i+1)*(w+2)+s.index(char)+1)
                mp_def[char]=mp_def[replacement_of_found]
        mp+=[boundary]+[mp_def[j] for j in s]+[boundary]
    mp+=[boundary]*(w+2)
    return h+2,w+2,mp,found
def TI(n):return GI(n,n-1)
def accum(ls):
    rt=[0]
    for i in ls:rt+=[rt[-1]+i]
    return rt
def bit_combination(n,base=2):
    rt=[]
    for tb in range(base**n):s=[tb//(base**bt)%base for bt in range(n)];rt+=[s]
    return rt
def gcd(x,y):
    if y==0:return x
    if x%y==0:return y
    while x%y!=0:x,y=y,x%y
    return y
def YN(x):print(['NO','YES'][x])
def Yn(x):print(['No','Yes'][x])
def show(*inp,end='\n'):
    if show_flg:print(*inp,end=end)

mo=10**9+7
inf=float('inf')
FourNb=[(-1,0),(1,0),(0,1),(0,-1)];EightNb=[(-1,0),(1,0),(0,1),(0,-1),(1,1),(-1,-1),(1,-1),(-1,1)];compas=dict(zip('WENS',FourNb));cursol=dict(zip('LRUD',FourNb))
l_alp=string.ascii_lowercase
#sys.setrecursionlimit(10**7)
read=sys.stdin.buffer.read
readline=sys.stdin.buffer.readline
input=lambda: sys.stdin.readline().rstrip()

class Tree:
    def __init__(self,inp_size=None,ls=None,init=True,index=1):
        self.LCA_init_stat=False
        self.ETtable=[]
        if init:
            if ls==None:
                self.stdin(inp_size,index=index)
            else:
                self.node_size=len(ls)+1
                self.edges,_=GI(self.node_size,self.node_size-1,ls,index=index)
        return
 
    def stdin(self,inp_size=None,index=1):
        if inp_size==None:
            self.node_size=int(input())
        else:
            self.node_size=inp_size
        self.edges,_=GI(self.node_size,self.node_size-1,index=index)
        return
    
    def listin(self,ls,index=0):
        self.node_size=len(ls)+1
        self.edges,_=GI(self.node_size,self.node_size-1,ls,index=index)
        return
 
    def dfs(self,x,func=lambda pr,prv,nx,dist:prv+dist,root_v=0):
        q=deque([x])
        v=[None]*self.node_size
        v[x]=root_v
        while q:
            c=q.pop()
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=func(c,v[c],nb,d)
        return v
 
    def bfs(self,x,func=lambda pr,prv,nx,dist:prv+dist,root_v=0):
        q=deque([x])
        v=[None]*self.node_size
        v[x]=root_v
        while q:
            c=q.popleft()
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=func(c,v[c],nb,d)
        return v
 
    def parent(self,x):
        return self.dfs(0,func=lambda pr,prv,nx,dist:pr,root_v=-1)
 
    def topological_sort(self,x):  # return topological sort of the tree
        tps=[]
        q=deque([x])
        v=[None]*self.node_size
        v[x]=0
        while q:
            c=q.popleft()
            tps.append(c)
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=0
        return tps
 
    def EulerTour(self,x):
        q=deque()
        q.append(x)
        self.depth=[None]*self.node_size
        self.depth[x]=0
        self.ETtable=[]
        self.ETdepth=[]
        self.ETin=[-1]*self.node_size
        self.ETout=[-1]*self.node_size
        cnt=0
        while q:
            c=q.pop()
            if c<0:
                ce=~c
            else:
                ce=c
                for nb,d in self.edges[ce]:
                    if self.depth[nb]==None:
                        q.append(~ce)
                        q.append(nb)
                        self.depth[nb]=self.depth[ce]+1
            self.ETtable.append(ce)
            self.ETdepth.append(self.depth[ce])
            if self.ETin[ce]==-1:
                self.ETin[ce]=cnt
            else:
                self.ETout[ce]=cnt
            cnt+=1
        return
    
    def doubling_LCA(self,root,x,y):
        if self.LCA_init_stat==False:
            self.depth=[None]*self.node_size
            self.depth=self.bfs(0,func=lambda pr,prv,nxt,dist:prv+1)
            self.par=self.bfs(0,func=lambda pr,prv,nxt,dist:pr)
            self.db=[self.par]
            for i in range(self.node_size.bit_length()):
                #show(self.db)
                self.db+=[[self.db[-1][self.db[-1][i]] for i in range(self.node_size)]]
            self.LCA_init_stat=True
        dx=self.depth[x]
        dy=self.depth[y]
        if dx>dy:
            dx,dy=dy,dx
        c=self.node_size.bit_length()
        while c>0:
            if dx+c<=dy:
                x=self.db[c][x]
                dx+=1<<c
            c>>=1
        
        if x==y:
            return x
        
        c=self.node_size.bit_length()
        while c>0:
            if self.db[c][x]!=self.db[c][y]:
                x=self.db[c][x]
                y=self.db[c][y]
            c>>=1
        
        return self.par[x]
        
    def LCA_init(self,root):
        self.EulerTour(root)
        self.st=SparseTable(self.ETdepth,init_func=min,init_idl=inf)
        #self.st=SegTree(self.node_size*2-1,self.ETdepth,function=min,ide=inf)
        self.LCA_init_stat=True
        return
    
    def LCA(self,root,x,y):
        if self.LCA_init_stat==False:
            self.LCA_init(root)
        xin,xout=self.ETin[x],self.ETout[x]
        yin,yout=self.ETin[y],self.ETout[y]
        a=min(xin,yin)
        b=max(xout,yout,xin,yin)
        id_of_min_dep_in_et=self.st.query_id(a,b+1)
        return self.ETtable[id_of_min_dep_in_et]
 
    def __str__(self):
        return  str(self.edges)
 
    def show(self):
        if all([all([d==1 for nd,d in e]) for e in self.edges]):
            print( [[nd for nd,d in e] for e in self.edges] )
        else:
            print(self)
 
    def dfs2(self,x,func=lambda pr,prv,nx,dist:prv+dist,root_v=0):
        q=deque([x])
        v=[None]*self.node_size
        v[x]=root_v
        dfs_tr=[x]
        while q:
            c=q.pop()
            for nb,d in self.edges[c]:
                if v[nb]==None:
                    q.append(nb)
                    v[nb]=func(c,v[c],nb,d)
                    dfs_tr+=nb,
        return v,dfs_tr

class SparseTable: # O(N log N) for init, O(1) for query(l,r)
    def __init__(self,ls,init_func=min,init_idl=float('inf')):
        self.func=init_func
        self.idl=init_idl
        self.size=len(ls)
        self.N0=self.size.bit_length()
        self.table=[ls[:]]
        self.index=[list(range(self.size))]
        self.lg=[0]*(self.size+1)
        
        for i in range(2,self.size+1):
            self.lg[i]=self.lg[i>>1]+1
 
        for i in range(self.N0):
            tmp=[self.func(self.table[i][j],self.table[i][min(j+(1<<i),self.size-1)]) for j in range(self.size)]
            tmp_id=[self.index[i][j] if self.table[i][j]==self.func(self.table[i][j],self.table[i][min(j+(1<<i),self.size-1)]) else self.index[i][min(j+(1<<i),self.size-1)] for j in range(self.size)]
            self.table+=[tmp]
            self.index+=[tmp_id]
    
    # return func of [l,r)
    def query(self,l,r):
        if r>self.size:r=self.size
        #N=(r-l).bit_length()-1
        N=self.lg[r-l]
        return self.func(self.table[N][l],self.table[N][max(0,r-(1<<N))])
    
    # return index of which val[i] = func of v among [l,r)
    def query_id(self,l,r):
        if r>self.size:r=self.size
        #N=(r-l).bit_length()-1
        N=self.lg[r-l]
        a,b=self.index[N][l],self.index[N][max(0,r-(1<<N))]
        if self.table[0][a]==self.func(self.table[N][l],self.table[N][max(0,r-(1<<N))]):
            b=a
        return b
    
    # return boundary index of r such that func({table[i]} =< x , i in [pos,r]
    def right_bound(self,pos,x):
        k=(self.size-pos).bit_length()
        for j in range(k)[::-1]:
            nx=pos+(1<<j)
            if nx<n and self.query(pos,nx+1)<=x:
                pos+=(1<<j)
        return pos
    
    # return boundary index of l such that func({table[i]} =< x , i in [l,pos]
    def left_bound(self,pos,x):
        k=pos.bit_length()
        for j in range(k)[::-1]:
            nx=pos-(1<<j)
            if 0<=nx and self.query(nx,pos+1)<=x:
                pos-=(1<<j)
        return pos

    def __str__(self):
        return str(self.table[0])
 
    def print(self):
        for i in self.table:
            print(*i)

show_flg=False
show_flg=True

ans=0

#h,w,K=LI()
n=I()
ca=['AC','WA','TLE','RE']
d=defaultdict(int)
for i in ca:
    d[i]=0
    
for i in range(n):
    s=input()
    d[s]+=1

for i in ca:
    print(i,'x',d[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
s = [input() for i in range(n)]
a = Counter(s)
AC = 0
WA = 0
TLE = 0
RE = 0

if "AC" not in a.keys():
    AC = 0
else:
    AC = a['AC']
if "WA" not in a.keys():
    WA = 0
else:
    WA = a['WA']
if "TLE" not in a.keys():
    TLE = 0
else:
    TLE = a['TLE']
if "RE" not in a.keys():
    RE = 0
else:
    RE = a['RE']

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

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

for i in range(len(ans)):
    if ans[i] == 'AC':
        AC += 1
    elif ans[i] == 'WA':
        WA += 1
    elif ans[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())
S = [input() for i in range(N)]

a=S.count('AC')
b=S.count('WA')
c=S.count('TLE')
d=S.count('RE')

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

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

cnt1 = 0
cnt2 = 0
cnt3 = 0
cnt4 = 0

for i in range(n):
    a = input()
    if a == "AC":
        cnt1 += 1
    elif a == "WA":
        cnt2 += 1
    elif a == "TLE":
        cnt3 += 1
    elif a == "RE":
        cnt4 += 1

print("AC x %d" %(cnt1))
print("WA x %d" %(cnt2))
print("TLE x %d" %(cnt3))
print("RE x %d" %(cnt4))

Submission status: Accepted

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

S=[]
N_AC=0
N_WA=0
N_TLE=0
N_RE=0

for i in range(0,N,1):
  ip=input()
  S.append(ip)
  if ip=="AC":
    N_AC+=1
  elif ip=="WA":
    N_WA+=1
  elif ip=="TLE":
    N_TLE+=1
  else:
    N_RE+=1

print("AC x "+str(N_AC))
print("WA x "+str(N_WA))
print("TLE x "+str(N_TLE))
print("RE x "+str(N_RE))

Submission status: Accepted

Solution code:
n = int(input())
l = []
for x in range(0,n):
	l.append(input())
print(f'AC x {l.count("AC")}')
print(f'WA x {l.count("WA")}')
print(f'TLE x {l.count("TLE")}')
print(f'RE x {l.count("RE")}')

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())

l_r = ["AC","WA","TLE","RE"]

ac,wa,tle,re = 0,0,0,0
l_s = [ac,wa,tle,re]

for i in range(n):
  x = str(input())
  if x == l_r[0]:
    ac += 1
    l_s[0] = ac
  if x == l_r[1]:
    wa += 1
    l_s[1] = wa
  if x == l_r[2]:
    tle += 1
    l_s[2] = tle
  if x == l_r[3]:
    re += 1
    l_s[3] = re

for j in range(4):
  print(l_r[j]," x ",l_s[j])

Submission status: Accepted

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

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

c = 0
w = 0
t = 0
r = 0


for j in range(N):
	if S[j] == "AC":
		c += 1
	elif S[j] == "WA":
		w += 1
	elif S[j] == "TLE":
		t += 1
	elif S[j] == "RE":
		r += 1
		
print("AC x " + str(c))
print("WA x " + str(w))
print("TLE x " + str(t))
print("RE x " + str(r))

Submission status: Accepted

Solution code:
N = int(input())
A  = [input() for _ in range(N)]
c0=A.count("AC")
c1=A.count("WA")
c2=A.count("TLE")
c3=A.count("RE")
print("AC x",c0)
print("WA x",c1)
print("TLE x",c2)
print("RE x",c3)

Submission status: Accepted

Solution code:
N = int(input())
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0

for i in range(N):
    S = input()
    if('AC' == S):
        count_AC += 1
    elif('WA' == S):
        count_WA += 1
    elif('TLE' == S):
        count_TLE += 1
    else:
        count_RE += 1
        
print('AC x', count_AC)
print('WA x', count_WA)
print('TLE x', count_TLE)
print('RE x', count_RE)

Submission status: Accepted

Solution code:
n = int(input())
s_i = []
for i in range(n):
  s = input()
  s_i.append(s)

ac = s_i.count('AC')
wa = s_i.count('WA')
tle = s_i.count('TLE')
re = s_i.count('RE')

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())
list=[]
for i in range(n):
    s = input()
    list.append(s)
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:
a = int(input())

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

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

    if s == "AC":
        ac += 1
    elif s == "WA":
        wa += 1
    elif s == "TLE":
        tle += 1
    else:
        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:
D =[]
N = int(input())
for i in range(N):
    S = input()
    D.append(S)
    
#print(D)


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

Submission status: Accepted

Solution code:
N = int(input())
a = []
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    b = input()
    a.append(b)
for ty in range(N):
    if a[ty] == "AC":
        AC += 1
    if a[ty] == "WA":
        WA += 1
    if a[ty] == "TLE":
        TLE += 1
    if a[ty] == "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:
t = int(input())
hash = {'AC' :0,'WA' : 0, 'TLE' : 0, 'RE' : 0}
for i in range(t):
	s = input()
	hash[s] = hash.get(s,0)+1
for i,j in hash.items():
	print(f'{i} x {j}')

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 %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())
l = []
for i in range(N):
    s = str(input())
    l.append(s)
    
res = ['AC','WA','TLE','RE']
num = [0,0,0,0]
for i in range (N):
    for j in range(4):
        if res[j] == l[i]:
            num[j] += 1

for i in range(4):
    print(res[i] + ' x',num[i])

Submission status: Accepted

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

counts = [0]*4
for i in range(N):
    if strng[i] == 'AC':
        counts[0] += 1
    elif strng[i] == 'WA':
        counts[1] += 1
    elif strng[i] == 'TLE':
        counts[2] += 1
    elif strng[i] == 'RE':
        counts[3] += 1

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

Submission status: Accepted

Solution code:
N=int(input())
S = [input() for i in range(N)]
C=("AC","WA","TLE","RE")

for i in C:
    print(str(i)+" x "+str(S.count(str(i))))

Submission status: Accepted

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

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

for i in s:
    if i == "AC":
        ac += 1
    elif i == "WA":
        wa += 1
    elif i == "TLE":
        tle += 1
    elif i == "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 _ in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S=[]
for i in range(N):
    S.append(input())
AC=0
WA=0
TLE=0
RE=0


for i in S:
    if i=="AC":
        AC=AC+1
    elif i=="WA":
        WA=WA+1
    elif i=="TLE":
        TLE=TLE+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 = 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())
S = []
for _ in range(N):
    S.append(input())
C = [0] * 4

for i in range(N):
    Si = S[i]
    if Si[0] == 'A':
        C[0] += 1
    if Si[0] == 'W':
        C[1] += 1
    if Si[0] == 'T':
        C[2] += 1
    if Si[0] == 'R':
        C[3] += 1

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

Submission status: Accepted

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

r = s.count('AC')
y = s.count('WA')
z = s.count('TLE')
w = s.count('RE')

print('AC x ' + str(r))
print('WA x ' + str(y))
print('TLE x ' + str(z))
print('RE x ' + str(w))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter


def main():

    N = int(input())
    lst = []

    for _ in range(N):
        lst.extend(input().split())

    c = dict(Counter(lst))


    for i in ["AC", "WA", "TLE", "RE"]:
        c.setdefault(i, 0)
        print(f"{i} x {c[i]}")


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

for i in range(n):

    s = input()

    d[s] += 1

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())
s = []

for i in range(n):
    s.append(str(input()))

a = 0
b = 0
c = 0
d = 0

for _ in s:
    if _ == 'AC':
        a += 1
    if _ == 'WA':
        b += 1
    if _ == 'TLE':
        c += 1
    if _ == 'RE':
        d += 1

print('AC x {}'.format(a))
print('WA x {}'.format(b))
print('TLE x {}'.format(c))
print('RE x {}'.format(d))

Submission status: Accepted

Solution code:
n = int(input())
s = [''] * n
a = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

for i in range(n):
    s[i] = input()
    if s[i] == 'AC':
        a['AC'] += 1
    elif s[i] == 'WA':
        a['WA'] += 1
    elif s[i] == 'TLE':
        a['TLE'] += 1
    elif s[i] == 'RE':
        a['RE'] += 1

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

Submission status: Accepted

Solution code:
from collections import Counter

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

cntr = dict(Counter(lis))

for key in ['AC', 'WA', 'TLE', 'RE']:
    print(key, 'x', cntr.get(key, 0))

Submission status: Accepted

Solution code:
N = int(input())
S = ["00"]
for i in range(N):
    S.append(str(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:
n = int(input())

d = {}
lst = ['AC', 'WA', 'TLE', 'RE']
for i in range(n):
    s = input()
    if s in d:
        d[s] += 1
    else:
        d[s] = 1

for i in lst:
    if i in d:
        print(i, 'x', d[i])
    else:
        print(i, 'x 0')

Submission status: Accepted

Solution code:
n=int(input())
a=0
b=0
c=0
d=0
for i in range(n):
    s=input()
    a+=s.count('AC')
    b+=s.count('WA')
    c+=s.count('TLE')
    d+=s.count('RE')
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())
s_list = [input() for _ in range(n)]

c1 = str(s_list.count('AC'))
c2 = str(s_list.count('WA'))
c3 = str(s_list.count('TLE'))
c4 = str(s_list.count('RE'))

print('AC' + ' x ' + c1)
print('WA' + ' x ' + c2)
print('TLE' + ' x ' + c3)
print('RE' + ' x ' + c4)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ac = 0
wa = 0
tle = 0
re = 0
n = int(input())

for i in range(n):
    m = input()
    if m == "AC":
        ac = ac + 1
    elif m == "WA":
        wa = wa + 1
    elif m == "TLE":
        tle = tle + 1
    elif m == "RE":
        re = re + 1

print ("AC x " + str(ac) + "\n" + "WA x " + str(wa) + "\n" + "TLE x " + str(tle) + "\n" + "RE x " + str(re))

Submission status: Accepted

Solution code:
N = int(input())
A = []

for i in range(N):
    A.append(input())

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

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(input())
AC = S.count("AC")
WA = S.count("WA")
TLE = S.count("TLE")
RE = S.count("RE")

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())
A = [input() for _ in range(n)]
a = int()
b = int()
c = int()
d = int()
for x in range(n):
    if A[x] == "AC":
        a = a+1
    elif A[x] == "WA":
        b = b+1
    elif A[x] == "TLE":
        c = c+1
    elif A[x] == "RE":
        d = 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())
s = []
for i in range(0, n):
    s.append(input())
count_AC = 0
count_WA = 0
count_TLE = 0
count_RE = 0
for j in s:
    if j == 'AC':
        count_AC += 1
    elif j == 'WA':
        count_WA += 1
    elif j == 'TLE':
        count_TLE += 1
    elif j == 'RE':
        count_RE += 1
print("AC" + " x " + str(count_AC))
print("WA" + " x " + str(count_WA))
print("TLE" + " x " + str(count_TLE))
print("RE" + " x " + str(count_RE))

Submission status: Accepted

Solution code:
n = int(input())
abc = []
for i in range(n):
    s = str(input())
    abc.append(s)

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

Submission status: Accepted

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


for i in range(1,N+1):
  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())
a = [input() for i in range(N)]
print("AC x ",a.count("AC"))
print("WA x ",a.count("WA"))
print("TLE x ",a.count("TLE"))
print("RE x ",a.count("RE"))