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

results = []
for i in range(n):
    results.append(input())

print("AC x",results.count("AC"))
print("WA x",results.count("WA"))
print("TLE x",results.count("TLE"))
print("RE x",results.count("RE"))

Submission status: Accepted

Solution code:
def solve():
    N = int(input())
    S = [input() for _ 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')))

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
n = int(input())
status_list = [0] * 4
for i in range(n):
    status = input()
    if status == 'AC':
        status_list[0] += 1
    elif status == 'WA':
        status_list[1] += 1
    elif status == 'TLE':
        status_list[2] += 1
    else:
        status_list[3] += 1

status_case = ['AC', 'WA', 'TLE', 'RE']
for s, x in zip(status_case, status_list):
    print(s + ' x ' + str(x))

Submission status: Accepted

Solution code:
AC = 0
WA = 0
TLE = 0
RE = 0
N = int(input())
for i in range(N):
	a = input()
	if(a == "AC"):
		AC = AC + 1
	if(a == "WA"):
 		WA = WA + 1
	if(a == "TLE"):
		TLE = TLE + 1
	if(a=="RE"):
		RE = RE + 1
print("AC x "+ str(AC))
print("WA x "+ str(WA))
print("TLE x "+ str(TLE))
print("RE x "+ str(RE))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
AC = []
WA = []
TLE = []
RE = []

for _ in range(int(input())):
  s = input()

  if s == "AC":
    AC.append(s)
  elif s == "WA":
    WA.append(s)
  elif s == "TLE":
    TLE.append(s)
  elif s == "RE":
    RE.append(s)

print("AC", "x", len(AC))
print("WA", "x", len(WA))
print("TLE", "x", len(TLE))
print("RE", "x", len(RE))

Submission status: Accepted

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

acnum=list_judge.count("AC")
wanum=list_judge.count("WA")
tlenum=list_judge.count("TLE")
renum=list_judge.count("RE")

print("AC x ",acnum)
print("WA x ",wanum)
print("TLE x ",tlenum)
print("RE x ",renum)

Submission status: Accepted

Solution code:
N = int(input())

S = [0] * N
cnt = [0] * 4
i = 0

while i < N:
    S[i] = input()
    if S[i] == 'AC':
        cnt[0] += 1
    elif S[i] == 'WA':
        cnt[1] += 1
    elif S[i] == 'TLE':
        cnt[2] += 1
    elif S[i] == 'RE':
        cnt[3] += 1
    i += 1

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

Submission status: Accepted

Solution code:
N = int(input())
C = [0]*4
for i in range(N):
  M = input()
  if M == "AC":
    C[0] += 1
  elif M == "WA":
    C[1] += 1
  elif M == "TLE":
    C[2] += 1
  elif M == "RE":
    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 _ 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:
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:
def main():
    S=[input() for _ in range(int(input()))]
    print('AC x', S.count('AC'))
    print('WA x', S.count('WA'))
    print('TLE x', S.count('TLE'))
    print('RE x', S.count('RE'))

main()

Submission status: Accepted

Solution code:
m = int(input())

d = [input() for i in range(m)]

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

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
judge_results = [input() for _ in range(n)]
count = Counter(judge_results)

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
d = Counter()
for _ in range(N):
    S = input()
    if d[S]:
        d[S] += 1
    else:
        d[S] = 1
for j in 'AC WA TLE RE'.split():
    num = d[j]
    print('{} x {}'.format(j, num))

Submission status: Accepted

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

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

print('AC x %d' %lst.count('AC'))
print('WA x %d' %lst.count('WA'))
print('TLE x %d' %lst.count('TLE'))
print('RE x %d' %lst.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", ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)

Submission status: Accepted

Solution code:
def count_data(s):
    judge_list = ['AC', 'WA', 'TLE', 'RE']
    for judge in judge_list:
        ans = s.count(judge)
        print('{} x {}'.format(judge, ans))

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

count_data(s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
C0, C1, C2, C3 = 0, 0, 0, 0

for i in range(N):
    S = str(input())
    if S == "AC":
        C0 = C0 + 1
    elif S == "WA":
        C1 = C1 + 1
    elif S == "TLE":
        C2 = C2 + 1
    else:
        C3 = C3 + 1

print("AC x " + str(C0))
print("WA x " + str(C1))
print("TLE x " + str(C2))
print("RE x " + str(C3))

Submission status: Accepted

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

Submission status: Accepted

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

# AC, WA, TLE, RE 
ac = str_list.count("AC")
wa = str_list.count("WA")
tle = str_list.count("TLE")
re = str_list.count("RE")

# AC x C
print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

Submission status: Accepted

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

Submission status: Accepted

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

for i in strings:
    print(i," x ",strings[i])

Submission status: Accepted

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

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(f"AC x {a}")
print(f"WA x {w}")
print(f"TLE x {t}")
print(f"RE x {r}")

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
ac_count, wa_count, tle_count, re_count = 0, 0, 0, 0
for i in range(n):
  s = input()
  if s == "AC":
    ac_count += 1
  elif s == "WA":
    wa_count += 1
  elif s == "TLE":
    tle_count += 1
  else:
    re_count += 1
print("AC x ",ac_count)
print("WA x ",wa_count)
print("TLE x ",tle_count)
print("RE x ",re_count)

Submission status: Accepted

Solution code:
from sys import stdin
import sys

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

a=b=c=d=0
for i in range(n):
    s = stdin.readline().rstrip()
    if s == "AC":
        a = a + 1
    elif s == "WA":
        b = b + 1
    elif s == "TLE":
        c = c + 1
    elif s == "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())
list ={"AC":0, "WA":0, "TLE":0, "RE":0 }
 
l=[input() for i in range(N)]

for i in list:
  print('{0} x {1}'.format(i, l.count(i)))

Submission status: Accepted

Solution code:
n=int(input())
dic={}
dic["AC"]=0
dic["WA"]=0
dic["TLE"]=0
dic["RE"]=0
for x in range(n):
  a=input()
  dic[a]=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:
n = int(input())
l = [input() for i in range(n)]
reslt = ["AC", "WA", "TLE", "RE"]
for j in reslt:
	print('{0} x {1}'.format(j, l.count(j)))

Submission status: Accepted

Solution code:
n = int(input())
l = [input() for i in range(n)]
reslt = ["AC", "WA", "TLE", "RE"]
for j in range(4):
	print(reslt[j], "x", l.count(reslt[j]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
if __name__ == "__main__":
    N=input()
    N=int(N)
    strs=["AC","WA","TLE","RE"]
    cnt=np.zeros(4,dtype=np.uint32)
    for i in range(N):
        b=input()
        for j,s in enumerate(strs):
            if s==b:
                cnt[j]+=1
    for i,s in enumerate(strs):
        print(s+" x "+str(cnt[i]))

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
  wrk = input()
  d[wrk] = d[wrk]+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=[0]*4
dict={"AC":0,"WA":1,"TLE":2,"RE":3}
for _ in range(n):
    temp=input()
    ans[dict[temp]]+=1
print("AC x ",ans[0])
print("WA x ",ans[1])
print("TLE x ",ans[2])
print("RE x ",ans[3])

Submission status: Accepted

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

for k,v in ans_dic.items():
    print(k+' x '+str(v))

Submission status: Accepted

Solution code:
n=input()
a=[0]*4
for i in range(n):
    s=raw_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:
S = [input() for i in range(int(input()))]
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,*S,=open(0).read().split()
N=int(N)
C0=S.count('AC')
C1=S.count('WA')
C2=S.count('TLE')
C3=S.count('RE')
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().rstrip())
dict = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}

for i in range(n):
  key = input().rstrip()
  dict[key] += 1

print('AC x',dict['AC'])
print('WA x', dict['WA'])
print('TLE x', dict['TLE'])
print('RE x', dict['RE'])

Submission status: Accepted

Solution code:
class kazoe:

    def __init__(self,b):
        b.sort()
        self.b = b

    def sum(self):
        c = [0] *4
        for i in range(len(self.b)):
            if(self.b[i] == "AC"):
                c[0] += 1
            else:
                if(self.b[i] == "TLE"):
                    c[1] += 1
                else:
                    if(self.b[i] == "WA"):
                        c[2] += 1
                    else:
                        c[3] += 1



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


a = int(input())
b =[]
for i in range(a):
    b.append(input())

ans = kazoe(b)
ans.sum()

Submission status: Accepted

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

for key in n_apperances:
    print('{} x {}'.format(key, n_apperances[key]))

Submission status: Accepted

Solution code:
from collections import Counter
 
a = int(input())
b = [input() for _ in range(a)]
for v in ["AC", "WA", "TLE", "RE"]:
  print(f"{v} x {b.count(v)}")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

n = int(input())
_ac = 0
_wa = 0
_tle = 0
_re = 0

for _ in range(n):
    word = input()
    if word in 'AC':
        _ac += 1
        continue
    elif word in 'WA':
        _wa += 1
        continue
    elif word in 'TLE':
        _tle += 1
        continue
    elif word in 'RE':
        _re += 1
        continue


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:
num = int(input())
category = {"AC": 0, "WA": 0, "TLE":0, "RE": 0}

for i in range(num):
  word = input()
  category[word] += 1

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

Submission status: Accepted

Solution code:
N = int(input())

ac, wa, tle, re = 0, 0, 0, 0
for i in range(N):
    tmp = input()
    if tmp == "AC":
        ac += 1
    elif tmp == "WA":
        wa += 1
    elif tmp == "TLE":
        tle += 1
    elif tmp == "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:
num = int(input())
count = {"AC":0, "WA":0, "TLE":0, "RE":0}
 
for i in range(num):
  word = input()
  for (key , n) in count.items():
    if word == key:
      count[key] += 1
 
for (key , n) in count.items():
  print(key + " x " + str(n))

Submission status: Accepted

Solution code:
N=int(input())

ACcount=0
WAcount=0
TLEcount=0
REcount=0

for i in range(N):
    s = input()
    if s == "AC":
        ACcount = ACcount + 1
    elif s == "WA":
        WAcount = WAcount + 1
    elif s == "TLE":
        TLEcount = TLEcount + 1
    elif s == "RE":
        REcount = REcount + 1

print("AC x " + str(ACcount))
print("WA x " + str(WAcount))
print("TLE x " + str(TLEcount))
print("RE x " + str(REcount))

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 i in ans:
    print(f"{i} x {ans[i]}")

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
judges = [input() for _ in range(n)]
c_judges = Counter(judges)
print('AC x ' + str(c_judges['AC']))
print('WA x ' + str(c_judges['WA']))
print('TLE x ' + str(c_judges['TLE']))
print('RE x ' + str(c_judges['RE']))

Submission status: Accepted

Solution code:
s = int(input())

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

for i in range(s):
  word = input()
  list[word]+=1

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

Submission status: Accepted

Solution code:
from collections import Counter

def main():
    n = int(input())
    list_ = []
    for i in range(n):
        list_.append(input())
    cnt = Counter(list_)

    labals = ['AC', 'WA', 'TLE', 'RE']
    for label in labals:
        print(f'{label} x {cnt[label]}')

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



if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
result = {
	"AC": 0,
  	"WA": 0,
    "TLE": 0,
    "RE": 0
}

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

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

Submission status: Accepted

Solution code:
import math

def main():

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

    n = int(input())
    for _ in range(n):
        s = input()
        mp[s]+=1

    for key in mp.keys():
        print(key, "x", mp[key])
main()

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
    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())
mydic = {"AC":0, "WA":0, "TLE":0, "RE":0}
for i in range(n):
    mystr = input()
    mydic[mystr] += 1
print("AC x " + str(mydic["AC"]))
print("WA x " + str(mydic["WA"]))
print("TLE x " + str(mydic["TLE"]))
print("RE x " + str(mydic["RE"]))

Submission status: Accepted

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

cases = int(input())
account = {'AC': 0, 'WA' : 0, 'TLE':0, 'RE':0}

while cases > 0:
  account[input().split()[0]] += 1
  cases -= 1
  
print('AC x '+ str(account['AC']))
print('WA x '+ str(account['WA']))
print('TLE x '+ str(account['TLE']))
print('RE x '+ str(account['RE']))

Submission status: Accepted

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

c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in s:
    if i == 'AC':
        c0 += 1
    elif i == 'WA':
        c1 += 1
    elif i == '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)]

c0 = s.count('AC')
c1 = s.count('WA')
c2 = s.count('TLE')
c3 = s.count('RE')

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())
a=b=c=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',a)
print('WA x',b)
print('TLE x',c)
print('RE x',d)

Submission status: Accepted

Solution code:
n=int(input())
rst=['AC','WA','TLE','RE']
cnt=[0,0,0,0]
for i in range(0,n):
    a=input()
    for j in range(0,4):
        if a==rst[j]:
            cnt[j]=cnt[j]+1
            break

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

Submission status: Accepted

Solution code:
com = ['AC','WA','TLE','RE']
cnt = [0, 0, 0, 0]
n = int(input(''))
for i in range(n):
    s = input('')
    for j in range(4):
        if s == com[j]:
            cnt[j] += 1

for i in range(4):
    print(com[i] + ' x ' + str(cnt[i]))

Submission status: Accepted

Solution code:
MB_AC = 0
MB_WA = 0
MB_TLE = 0
MB_RE = 0
n = int(input())
for i in range (n):
    ch = input ()
    if (ch =="AC") :
     MB_TLE += 1
    if (ch =="WA") :
     MB_WA += 1
    if (ch =="TLE") : 
     MB_RE += 1
    if (ch =="RE") :
     MB_AC += 1
print('AC x ',MB_TLE)
print('WA x ',MB_WA)
print('TLE x ',MB_RE)
print('RE x ',MB_AC)

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(f"AC x {ac}")
print(f"WA x {wa}")
print(f"TLE x {tle}")
print(f"RE x {re}")

Submission status: Accepted

Solution code:
n = int(input())
ac_count = 0
wa_count = 0
tle_count = 0
re_count = 0
for i in range(n):
    s = input()
    if s == 'AC':
        ac_count += 1
    elif s == 'WA':
        wa_count += 1
    elif s == 'TLE':
        tle_count += 1
    elif s == 'RE':
        re_count += 1
    else:
        continue

print('AC x ' + str(ac_count))
print('WA x ' + str(wa_count))
print('TLE x ' + str(tle_count))
print('RE x ' + str(re_count))

Submission status: Accepted

Solution code:
N = int(input())

x = []

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

AC = x.count('AC')
WA = x.count('WA')
TLE = x.count('TLE')
RE = x.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 = []
for i in range(N):
  S.append(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:
from collections import defaultdict

def b173(n, slist):

    countdict = defaultdict(int)

    for s in slist:
        countdict[s] += 1

    return countdict

def main():
    tlist = ["AC", "WA", "TLE", "RE"]
    n = int(input())
    slist = [str(input())for i in range(n)]
    countdict = b173(n, slist)

    for t in tlist:
        print(t + " x " + str(countdict.get(t, 0)))

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n=int(input())
a=0
w=0
t=0
r=0
for _ in range(n):
    s=input()
    if s[0]=="A":
        a+=1
    elif s[0]=="W":
        w+=1
    elif s[0]=="T":
        t+=1
    elif s[0]=="R":
        r+=1
print("AC x",a)
print("WA x",w)
print("TLE x",t)
print("RE x",r)

Submission status: Accepted

Solution code:
n=int(input())
idx = {}
idx['AC']=0
idx['WA']=0
idx['TLE']=0
idx['RE']=0

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

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

Submission status: Accepted

Solution code:
c0,c1,c2,c3 = 0,0,0,0
res = {"AC":c0, "WA":c1, "TLE":c2, "RE":c3}
n = int(input())
for i in range(n):
    s = input()
    res[s] += 1
for key,val in res.items():
    print(key+" x "+str(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

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

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)]
ac,wa,tle,re=0,0,0,0
for i in range(len(S)):
  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)

Submission status: Accepted

Solution code:
N = int(input())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 += 1
 
    elif Si == 'WA':
        C1  += 1
 
    elif Si == '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())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 = C0+1
 
    elif Si == 'WA':
        C1  =C1+1
 
    elif Si == 'TLE':
        C2  =C2+1
 
    else:
        C3  =C3+1
 
print('AC x ' + str(C0))
print('WA x ' + str(C1))
print('TLE x ' + str(C2))
print('RE x ' + str(C3))

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for _ in range(n)]
ac = s.count("AC")
wa = s.count("WA")
tle = s.count("TLE")
re = s.count("RE")
print(f"AC x {ac}")
print(f"WA x {wa}")
print(f"TLE x {tle}")
print(f"RE x {re}")

Submission status: Accepted

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

Submission status: Accepted

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

while t:
  d[input()]+=1
  
  t-=1
  
for i in d:
  print(i,'x',d[i])

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())
ac=0
tle=0
re=0
wa=0
for i in range(n):
  s=input()
  if(s=='AC'):
  	ac+=1
  if(s=='TLE'):
  	tle+=1 
  if(s=='RE'):
  	re+=1
  if(s=='WA'):
  	wa+=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())
lst = [input() for i in range(n)]

c_ac = 0
c_wa = 0
c_tle = 0
c_re = 0
for e in lst:
  if e == 'AC':
    c_ac += 1
  elif e == 'WA':
    c_wa += 1
  elif e == 'TLE':
    c_tle += 1
  elif e == 'RE':
    c_re += 1
print('AC x {}'.format(c_ac))
print('WA x {}'.format(c_wa))
print('TLE x {}'.format(c_tle))
print('RE x {}'.format(c_re))

Submission status: Accepted

Solution code:
n = int(input())
s = []
AC = 0
WA = 0
TLE = 0
RE = 0
s = [input() for i in range(n)]
for j in range(n):
    if s[j]=="AC":
        AC = AC +1
    elif s[j]=="WA":
        WA = WA + 1
    elif s[j]=="TLE":
        TLE = TLE + 1
    else:
        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())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in range(N):
    Si = input()
    if Si == 'AC':
        C0 += 1

    elif Si == 'WA':
        C1  += 1

    elif Si == '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())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  s=input()
  if s=="AC":
    ac+=1
  elif s=="WA":
    wa+=1
  elif s=="TLE":
    tle+=1
  else:
    re+=1
print("AC","x",ac)
print("WA","x",wa)
print("TLE","x",tle)
print("RE","x",re)

Submission status: Accepted

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

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

for i in range(0, n):
  s = input()
  if s == 'AC':
    ac_count += 1
  elif s == 'WA':
    wa_count += 1
  elif s == 'TLE':
    tle_count += 1
  else:
    re_count += 1

print('AC x ' + str(ac_count))
print('WA x ' + str(wa_count))
print('TLE x ' + str(tle_count))
print('RE x ' + str(re_count))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
counter = {}
judge = ['AC', 'WA', 'TLE', 'RE']
for c in judge:
    counter[c] = 0

num = int(input())
for i in range(num):
    counter[input()] += 1

for c in judge:
    print('%s x %d' % (c, counter[c]))

Submission status: Accepted

Solution code:
import time
startTimeProblem=time.time()

import fileinput, sys, itertools, functools
from math import *
from bisect import *
from heapq import *
from collections import *

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

class InputHelper:
    def __init__(self):
        self.myinput = fileinput.input()

    def isLocal(self):
        return not fileinput.isstdin()

    def int(self):
        return int(self.myinput.readline().rstrip())

    def ints(self):
        return [int(_) for _ in self.myinput.readline().rstrip().split()]

    def str(self):
        return self.myinput.readline().rstrip()

    def strs(self):
        return [_ for _ in self.myinput.readline().rstrip().split()]

class OutputHelper:
    def int(self, a):
        print(a)    

    def ints(self, a):  
        print(" ".join([str(_) for _ in a]))
    
    def intsNL(self, a):
        for _ in a:
            print(_)
    
    def str(self, s):
        print(s)

    def strs(self, s):
        print(" ".join([_ for _ in s]))

    def strsNL(self, s):
        for st in s:
            print(st)

class ListNode:
    def __init__(self, val):
        self.val = val
        self.next = None
        self.prev = None

In = InputHelper()
Out = OutputHelper()

######################################

N = In.int()

there = ["AC", "WA", "TLE", "RE"]
counts = defaultdict(int)
for _ in range(N):
    s = In.str()

    counts[s]+=1

for t in there:
    Out.str(t + " x "+str(counts[t]))


######################################

if len(sys.argv)>2 and sys.argv[2]=="TIMEIT":
    fin = (time.time()-startTimeProblem)*1000
    print("{:.2f}".format(fin) + "ms")

Submission status: Accepted

Solution code:
import collections
n = int(input())
lst = []
for i in range(n):
	lst.append(input())

a = dict(collections.Counter(lst))

try:
	print('AC x '+str(a['AC']))
except :
	print('AC x 0')
try:
	print('WA x '+str(a['WA']))
except :
	print('WA x 0')
try:
	print('TLE x '+str(a['TLE']))
except:
	print('TLE x 0')
try:
	print('RE x '+str(a['RE']))
except :
	print('RE x 0')

Submission status: Accepted

Solution code:
N = int(input())
i = 0
dic = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
while i < N:
    string = input()
    dic[string] += 1
    i += 1

for key in dic:
    print('{} x {}'.format(key, dic[key]))

Submission status: Accepted

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

for x in lis:
  dic[x] += 1

for y in dic.keys():
  print(y, "x", dic[y])

Submission status: Accepted

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