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:
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y

n = ini()
a = ['AC x','WA x','TLE x','RE x']
result = [0,0,0,0]
for i in range(n):
        s = input()
        if s[0] == 'A':
                result[0] += 1
        elif s[0] == 'W':
                result[1] += 1
        elif s[0] == 'T':
                result[2] += 1
        else:
                result[3] += 1
for i in range(4):
        print(a[i],result[i])

Submission status: Accepted

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

n=int(input())
for i in range(n):
    k = input()
    if k == "AC":
        d['AC'] += 1
    elif k == "WA":
        d['WA'] += 1
    elif k == "TLE":
        d['TLE'] += 1
    elif k == "RE":
        d['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:
'''
Date         : 2020-08-10 14:56:09
Author       : ssyze
Description  : 
'''
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 %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())
ac = 0
wa = 0
tle = 0
re = 0

for i in range(n):
  a = input()
  if a == 'AC':
    ac += 1
  if a == 'WA':
    wa += 1
  if a == 'TLE':
    tle += 1
  if 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

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

sc = Counter(s)
print(f"AC x {sc['AC']}")
print(f"WA x {sc['WA']}")
print(f"TLE x {sc['TLE']}")
print(f"RE x {sc['RE']}")

Submission status: Accepted

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

somecase = ['AC','WA','TLE','RE']
for s in somecase:
    print('%s x %d'%(s,testcase.count(s)))

Submission status: Accepted

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

for i in range(N):
    s=str(input())
    lst.append(s)

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

for i in range(len(given)):
    print(str(given[i]) +" x " +str(lst.count(given[i])))

Submission status: Accepted

Solution code:
from collections import Counter
n=int(input())

dic=[""]*n

for i in range(n):
  dic[i]=str(input())

cnt=Counter(dic)

lookup=["AC", "WA", "TLE", "RE"]
for i in lookup:
  print(i, " x ",cnt[i])

Submission status: Accepted

Solution code:
#ABC173-B
N = int(input())
S = list()
for i in range(N):
 S.append(str(input()))
A = S.count("AC")
W = S.count("WA")
T = S.count("TLE")
R = S.count("RE")
print("AC x {}\nWA x {}\nTLE x {}\nRE x {}".format(A,W,T,R))

Submission status: Accepted

Solution code:
N = int(input())

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

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

for ans in ans_res:
    print(ans + " x " + str(S.count(ans)))

Submission status: Accepted

Solution code:
n = int(input())

a = 0
w = 0
t = 0
r = 0

for _ in range(n):
    s = input()
    if s == 'AC':
        a += 1
    elif s == 'WA':
        w += 1
    elif s == 'TLE':
        t += 1
    elif s == 'RE':
        r += 1

print('AC x ' + str(a))
print('WA x ' + str(w))
print('TLE x ' + str(t))
print('RE x ' + str(r))

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
import math

def main():
    n = int(input())
    judge = {"AC":0, "WA":0, "TLE":0, "RE":0}
    for _ in range(n):
        s = input()
        judge[s] += 1
    for key in judge.keys():
        print(f'{key} x {judge[key]}')
    
main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter
n = int(input())
a = list(input() for _ in range(n))
c = Counter(a)

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 i in range(N):
  deta = input()
  if deta == 'AC':
    AC += 1
  elif deta == 'WA':
    WA += 1
  elif deta == 'TLE':
    TLE += 1
  else :
    RE += 1
print('AC x {}'.format(AC))   
print('WA x {}'.format(WA))  
print('TLE x {}'.format(TLE))  
print('RE x {}'.format(RE))

Submission status: Accepted

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

ac_cnt = 0
wa_cnt = 0
tle_cnt = 0
re_cnt = 0

for st in s:
    if st == 'AC':
        ac_cnt = ac_cnt + 1
    elif st == 'WA':
        wa_cnt = wa_cnt + 1
    elif st == 'TLE':
        tle_cnt = tle_cnt + 1
    elif st == 'RE':
        re_cnt = re_cnt + 1

print('AC  x ' + str(ac_cnt))
print('WA  x ' + str(wa_cnt))
print('TLE  x ' + str(tle_cnt))
print('RE  x ' + str(re_cnt))

Submission status: Accepted

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

print('AC x %s' % dct['AC'])
print('WA x %s' % dct['WA'])
print('TLE x %s' % dct['TLE'])
print('RE x %s' % dct['RE'])

Submission status: Accepted

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

for k in ['AC', 'WA', 'TLE', 'RE']:
    print(k + ' x ' + str(r[k]))

Submission status: Accepted

Solution code:
N=int(input())
I=[]
for i in range(N):
    I.append(input())
a=0
b=0
c=0
d=0
for i in range(N):
    if I[i]=='AC':
        a+=1
    if I[i]=='WA':
        b+=1
    if I[i]=='TLE':
        c+=1
    if I[i]=='RE':
        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:
def Qb():
    n = int(input())

    l = [input() for v in range(n)]
    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')}")


if __name__ == '__main__':
    Qb()

Submission status: Accepted

Solution code:
N = int(input())
AC, WA, TLE, RE = 0, 0, 0, 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(f"AC x {AC}\nWA x {WA}\nTLE x {TLE}\nRE x {RE}")

Submission status: Accepted

Solution code:
N = int(input())

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

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

print('{} x {}'.format('AC', results['AC']))
print('{} x {}'.format('WA', results['WA']))
print('{} x {}'.format('TLE', results['TLE']))
print('{} x {}'.format('RE', results['RE']))

Submission status: Accepted

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

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

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
  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())
result = ['AC', 'WA', 'TLE', 'RE']
count = [0, 0, 0, 0]
for i in range(n):
    count[result.index(input())] += 1
for j in range(4):
    print(result[j] + ' x ' + str(count[j]))

Submission status: Accepted

Solution code:
N = int(input())
S = []
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 == "RE":
        re += 1
    else:
        tle += 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())

answer = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(N):
    s = input()
    answer[s] = answer.get(s, 0) + 1

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

Submission status: Accepted

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

c = Counter(input() for i in range(N))
for l in ['AC', 'WA', 'TLE', 'RE']:
  print("%s x %d" % (l, c[l]))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  x = input()
  if x =='AC':
    ac+=1
  if x =='WA':
    wa+=1
  if x =='TLE':
    tle+=1
  if x =='RE':
    re+=1
    
print('AC x {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))

Submission status: Accepted

Solution code:
n = int(input())
ac = 0
wa = 0
tle = 0
re  = 0
for i in range(n):
  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())

c0 = 0
c1 = 0
c2 = 0
c3 = 0
for i in range(n):
    s = input()
    if s == "AC":
        c0 += 1
    elif s == "WA":
        c1 += 1
    elif s == "TLE":
        c2 += 1
    else:
        c3 += 1

print("AC x", c0)
print("WA x", c1)
print("TLE x", c2)
print("RE x", c3)

Submission status: Accepted

Solution code:
n = int(input())
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())
A = []
for _ 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 = [input() for S 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())
AC=0
WA=0
TLE=0
RE=0
for i in range(N):
  C=input()
  if C=="AC":
    AC+=1
  elif C=="WA":
    WA+=1
  elif C=="TLE":
    TLE+=1
  elif C=="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 = list(input() for i in range(n))
a = s.count("AC")
w = s.count("WA")
t = s.count("TLE")
r = s.count("RE")

print("AC x " + str(a))
print("WA x " + str(w))
print("TLE x " + str(t))
print("RE x " + str(r))

Submission status: Accepted

Solution code:
n = int(input())
s = list(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())

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

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

Submission status: Accepted

Solution code:
n=int(input())

s=[]
for _ in range(n):
    
    s_n=input()
    s.append(s_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:
chars = list()
n = int(input())
for i in range(n):
    chars.append(input())
C0, C1, C2, C3 = 0, 0, 0, 0
for i in chars:
    if i == 'AC': C0 = C0 + 1
    elif i == 'WA': C1 = C1 + 1
    elif i == 'TLE': C2 = C2 + 1
    else: C3 = C3 + 1
print('AC x', C0)
print('WA x', C1)
print('TLE x', C2)
print('RE x', C3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def main():

    n = int(input()) 
    verdict = []
    for i in range(n):
        verdict.append(input())
        # AC, WA, TLE, and RE

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

list = []

for i in range(n):
    list.append(input())

AC = list.count('AC')
WA = list.count('WA')
TLE = list.count('TLE')
RE = 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 = ""
for i in range(n):
    s += 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:
from collections import Counter

c = Counter()

n = int(input())

for i in range(n):
    text = input()
    if text == "AC":
        c["AC"] += 1
    elif text == "WA":
        c["WA"] += 1
    elif text == "TLE":
        c["TLE"] += 1
    elif text == "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())
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 {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
n = int(input())

s = ""
for i in range(n):
    s += 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())
P = [input() for i in range(N)]

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

for item in P:
  if item == "AC":
    ac += 1
  elif item == "WA":
    wa += 1
  elif item == "TLE":
    tle += 1
  else:
    re += 1
    
print("AC x {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n = int(input())
ac = wa = tle = re = 0
temp = ""
for i in range(n):
    temp = input()
    if temp == "AC":
        ac += 1
    elif temp == "WA":
        wa += 1
    elif temp == "TLE":
        tle += 1
    elif temp == "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 = [str(input()) for i in range(n)]
print("AC x ",  s.count("AC"), sep="")
print("WA x ",  s.count("WA"), sep="")
print("TLE x ",  s.count("TLE"), sep="")
print("RE x ",  s.count("RE"), sep="")

Submission status: Accepted

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

for i in anser:
    x = S.count(i)
    print(i ," x " ,x)

Submission status: Accepted

Solution code:
N = int(input())
i = 1
list = []
while i <= N:
    data = input()
    list.append(data)
    i += 1

AC = 0
WA = 0
TLE = 0
RE = 0
for data in list:
    if data == "AC":
        AC += 1
    elif data == "WA":
        WA += 1
    elif data == "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())
C = str(0)
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
    C += str(input())
AC = C.count("AC")
WA = C.count("WA")
TLE = C.count("TLE")
RE = C.count("RE")
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 = 0
C1 = 0
C2 = 0
C3 = 0

for A in range(N) :
    B = input()
    if B == 'AC' :
        C0 += 1
    if B == 'WA' :
        C1 += 1
    if B == 'TLE':
        C2 += 1
    if B == 'RE' :
        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())
d = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

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

for k in d:
  print(k + " x " + str(d[k]))

Submission status: Accepted

Solution code:
n=int(input())
c=[0,0,0,0]

for i in range(n):
  a=input()
  if a=="AC":
    c[0]+=1
  if a=="WA":
    c[1]+=1
  if a=="TLE":
    c[2]+=1
  if a=="RE":
    c[3]+=1

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

Submission status: Accepted

Solution code:
N=int(input())
scores=[input() for _ in range(N)]
AC=WA=TLE=RE=0
for score in scores:
  if score == 'AC':
    AC += 1
  elif score == 'WA':
    WA += 1
  elif score == '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:
from collections import defaultdict


def solve():
    n = int(input())
    d = defaultdict(int)
    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'])


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
from collections import Counter
A=[]
for i in range(n):
  A.append((input()))
C=Counter(A)
print(f"""AC x {C["AC"]}
WA x {C["WA"]}
TLE x {C["TLE"]}
RE x {C["RE"]}""")

Submission status: Accepted

Solution code:
n = int(input())

i = 0
ac = 0
wa = 0
tle = 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
    i += 1

print("AC x %s" %(ac))
print("WA x %s" %(wa))
print("TLE x %s" %(tle))
print("RE x %s" %(re))

Submission status: Accepted

Solution code:
n = int(input())
ac = 0
wa = 0
tle = 0
re = 0
s = ""
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}\nWA x {wa}\nTLE x {tle}\nRE x {re}")

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    S = []
    C = [0] * 4

    for _ in range(N):
        S.append(input())

    C[0] = S.count("AC")
    C[1] = S.count("WA")
    C[2] = S.count("TLE")
    C[3] = S.count("RE")

    print(f"AC x {C[0]}")
    print(f"WA x {C[1]}")
    print(f"TLE x {C[2]}")
    print(f"RE x {C[3]}")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
sss = [input() for _ in range(n)]
cnt_AC=0
cnt_WA=0
cnt_TLE=0
cnt_RE=0

for i in sss:
    if i == "AC":
        cnt_AC +=1
    if i == "WA":
        cnt_WA +=1
    if i == "TLE":
        cnt_TLE +=1
    if i == "RE":
        cnt_RE +=1

print("AC x", cnt_AC)
print("WA x", cnt_WA)
print("TLE x", cnt_TLE)
print("RE x", cnt_RE)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
sys.setrecursionlimit(10**7)
import bisect
import heapq
import itertools
import math
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from math import gcd
from operator import add, itemgetter, mul, xor
def cmb(n,r,mod):
  bunshi=1
  bunbo=1
  for i in range(r):
    bunbo = bunbo*(i+1)%mod
    bunshi = bunshi*(n-i)%mod
  return (bunshi*pow(bunbo,mod-2,mod))%mod
mod = 10**9+7
def I(): return int(input())
def LI(): return list(map(int,input().split()))
def MI(): return map(int,input().split())
def LLI(n): return [list(map(int, input().split())) for _ in range(n)]

#bisect.bisect_left(list,key)はlistのなかでkey未満の数字がいくつあるかを返す
#bisect.bisect_right(list, key)はlistのなかでkey以下の数字がいくつあるかを返す
#これを応用することで
#len(list) - bisect.bisect_left(list,key)はlistのなかでkey以上の数字がいくつあるかを返す
#len(list) - bisect.bisect_right(list,key)はlistのなかでkeyより大きい数字がいくつあるかを返す
#これらを使うときはあらかじめlistをソートしておくこと！

n = I()
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
ac = str(ac)
wa = str(wa)
tle = str(tle)
re = str(re)
print("AC x "+ac)
print("WA x "+wa)
print("TLE x "+tle)
print("RE x "+re)

Submission status: Accepted

Solution code:
N=int(input())
S= [input() for i in range(N)]
AC_len=int(S.count('AC'))
WA_len=int(S.count('WA'))
TLE_len=int(S.count('TLE'))
RE_len=int(S.count('RE'))
print('AC x'+' '+str(AC_len))
print('WA x'+' '+str(WA_len))
print('TLE x'+' '+str(TLE_len))
print('RE x'+' '+str(RE_len))

Submission status: Accepted

Solution code:
N = input()
N = int(N)
S = list(input() for i in range(N))#N個縦に入力

C0 = 0
C1 = 0
C2 = 0
C3 = 0

for i in range(len(S)):
    if S[i] == 'AC':
        C0 += 1
    elif S[i] == 'WA':
        C1 += 1
    elif S[i] == 'TLE':
        C2 += 1
    elif S[i] == 'RE':
        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:
from collections import defaultdict

N, *S = open(0).read().split()
dic = defaultdict(int)
for s in S:
    dic[s] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
c0, c1, c2, c3 = [0 for i in range(4)]
for j in range(n):
  judge = input()
  if judge == "AC":
    c0 += 1
  elif judge == "WA":
    c1 += 1
  elif judge == "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:
d = {"AC":0, "WA":0, "TLE":0, "RE":0}
n = int(input())
for i in range(n):
  x = input()
  d[x] = d[x] + 1
for i in d:
  print(i, "x", d[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input()
d={k:0 for k in 'AC WA TLE RE'.split()}
for ln in sys.stdin:
    d[ln.strip()]+=1
for k,v in d.items():
    print(k,'x',v)

Submission status: Accepted

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

result={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in s:
	result[i]+=1
for k,v in result.items():
	print("{} x {}".format(k,v))

Submission status: Accepted

Solution code:
n=int(input())
cntAC=0
cntWA=0
cntTLE=0
cntRE=0
for i in range(n):
    s=input()
    if s=="AC":
        cntAC+=1
    elif s=="WA":
        cntWA+=1
    elif s=="TLE":
        cntTLE+=1
    else:
        cntRE+=1
print("AC x %d" % cntAC)
print("WA x %d" % cntWA)
print("TLE x %d" % cntTLE)
print("RE x %d" % cntRE)

Submission status: Accepted

Solution code:
import sys
input()
d=dict.fromkeys('AC WA TLE RE'.split(),0)
for ln in sys.stdin:
    d[ln.strip()]+=1
for k,v in d.items():
    print(k,'x',v)

Submission status: Accepted

Solution code:
from collections import Counter
L=int(input())
L1=[input() for i in range(L)]
L2=Counter(L1)
print("AC x",L2["AC"])
print("WA x",L2["WA"])
print("TLE x",L2["TLE"])
print("RE x",L2["RE"])

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H = int(input())
S = []
for _ in range(H):
    S.append(input())  # S += [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=int(input())
C0,C1,C2,C3=0,0,0,0

for i in range(N):
    s=input()
    if(s=="AC"):
        C0+=1
    elif(s=="WA"):
        C1+=1
    elif(s=="TLE"):
        C2+=1
    else:
        C3+=1
print("AC x",C0,"\nWA x",C1,"\nTLE x",C2,"\nRE x",C3)

Submission status: Accepted

Solution code:
Number_of_Data=int(input().rstrip())
Judge_Result = [input().split() for i in range(int(Number_of_Data))]
Result_counter=[[0],[0],[0],[0]]#AC,WA,TLE,RE
for i in range(Number_of_Data):
    if Judge_Result[i][0]=='AC':
        Result_counter[0][0] +=1
    elif Judge_Result[i][0]=='WA':
        Result_counter[1][0] +=1
    elif Judge_Result[i][0]=='TLE':
        Result_counter[2][0] +=1
    elif Judge_Result[i][0]=='RE':
        Result_counter[3][0] +=1

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

Submission status: Accepted

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

Submission status: Accepted

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