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:
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(1000000)
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]

N = I()
sr = SR(N)

c = collections.Counter(sr)

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=[input() for i in range(N)]
ac_count=0
wa_count=0
tle_count=0
re_count=0
for i in range(len(S)):
    if S[i]=="AC":
        ac_count+=1
    if S[i]=="WA":
        wa_count+=1
    if S[i]=="TLE":
        tle_count+=1
    if S[i]=="RE":
        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:
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:
#!/usr/bin/env python3

import sys
sys.setrecursionlimit(300000)


def solve(N: int, S: "List[str]"):
    s = {'AC': 0, 'WA': 0, 'TLE':0, 'RE':0}
    for c in S:
        s[c] += 1
    for c in ['AC', 'WA', 'TLE', 'RE']:
        print('{} x {}'.format(c, s[c]))
    return

def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    S = [next(tokens) for _ in range(N)]  # type: "List[str]"
    solve(N, S)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
S = [0]*N
AC = int(0)
WA = int(0)
TLE = int(0)
RE = int(0)


for i in range(0,N):
  S[i] = input()
  if(S[i]=='AC'):
    AC += 1
  if(S[i]=='WA'):
    WA += 1
  if(S[i]=='TLE'):
    TLE += 1
  if(S[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.append(input())

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

for i in range(n):
    out[s[i]] += 1
for i in ["AC","WA","TLE","RE"]:
    print(f"{i} x {out[i]}")

Submission status: Accepted

Solution code:
N = int(input())
cnt=[0,0,0,0]
for _ in range(N):
    S=input()
    if S=="AC":
      cnt[0]+=1
    elif S=="WA":
      cnt[1]+=1
    elif S=="TLE":
      cnt[2]+=1
    else:
      cnt[3]+=1

msg="AC x " + str(cnt[0]) + "\n"
msg+="WA x " + str(cnt[1]) + "\n"
msg+="TLE x " + str(cnt[2]) + "\n"
msg+="RE x " + str(cnt[3])

print(msg)

Submission status: Accepted

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

b = l.count("AC")
c = l.count("WA")
d = l.count("TLE")
e = l.count("RE")

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

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())
a = 0
w = 0
t = 0
r = 0

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

Submission status: Accepted

Solution code:
n=int(input())
a=0
w=0
t=0
r=0
for i in range(n):
    s=str(input())
    if(s=='AC'):
        a+=1
    elif(s=="WA"):
        w+=1
    elif(s=="TLE"):
        t+=1
    else:
        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())
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 = [input() for i in range(N)]
S_name = ['AC','WA','TLE','RE']
for i in range(len(S_name)):
    print(S_name[i] ,'x' ,S.count(S_name[i]))

Submission status: Accepted

Solution code:
N = int(input())
AC = TLE = WA = RE = 0

for _ in range(N):
    user = input()
    if user == "AC":
        AC += 1
    elif user == "TLE":
        TLE += 1
    elif user == "WA":
        WA += 1
    elif user == "RE":
        RE += 1
print("AC x {} \nWA x {} \nTLE x {} \nRE x {}".format(AC, WA, TLE, RE))

Submission status: Accepted

Solution code:
n = int(input())
a = ['AC', 'WA', 'TLE', 'RE']
ans = [0]*4
for i in range(n):
    s = input()
    ans[a.index(s)] += 1
for x, y in zip(a, ans):
    print(x, ' x ', y)

Submission status: Accepted

Solution code:
import sys
n = int(input())
a = []
for l in sys.stdin:
    a.append(l.replace('\n',''))
    
def count(a,str):
  return len([i for i in a if i ==str])

print(f'AC x {count(a,"AC")}')
print(f'WA x {count(a,"WA")}')
print(f'TLE x {count(a,"TLE")}')
print(f'RE x {count(a,"RE")}')

Submission status: Accepted

Solution code:
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
    s=input()
    d=[]
    d.append(s)
    for i in range(len(d)):
        if d[i]=="AC":
            ac=ac+1
        if d[i]=="WA":
            wa=wa+1
        if d[i]=="TLE":
            tle=tle+1
        if d[i]=="RE":
            re=re+1
print("AC x ",ac)
print("WA x ",wa)
print("TLE x ",tle)
print("RE x ",re)

Submission status: Accepted

Solution code:
#!/usr/bin/env python

if __name__ == "__main__":
    num = int(input())
    
    AC = 0
    WA = 0
    TLE = 0
    RE = 0
    for i in range(num):
        case = input()
        if case == "AC":
            AC+=1
        if case == "WA":
            WA+=1
        if case == "TLE":
            TLE+=1
        if case == "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:
s = int(input())
n = []
for i in range(s):
    n.append(input())
a = n.count('AC')
b = n.count('WA')
c = n.count('TLE')
d = n.count('RE')
   
A = str(a)
B = str(b)
C = str(c)
D = str(d)
        
AC = 'AC x ' + A
WA = 'WA x ' + B
TLE = 'TLE x ' + C
RE = 'RE x ' + D

print(AC)
print(WA)
print(TLE)
print(RE)

Submission status: Accepted

Solution code:
import math
import sys

def main():

    n = int(input())
    s = [input() for i in range(n)]
    c0,c1,c2,c3 = 0,0,0,0
    
    for i in range(n):
        if "AC" in s[i]:
            c0 += 1
        if s[i] in 'WA':
            c1 += 1
        if s[i] in 'TLE':
            c2 += 1
        if s[i] in 'RE':
            c3 += 1
    print("AC x "+str(c0))
    print("WA x "+str(c1))
    print("TLE x "+str(c2))
    print("RE x "+str(c3))
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n = int(input())
ct_ac = 0
ct_wa = 0
ct_tle = 0
ct_re = 0
for i in range(n):
    s = input()
    if s == 'AC':
        ct_ac += 1
    if s == 'WA':
        ct_wa += 1
    if s == 'TLE':
        ct_tle += 1
    if s == 'RE':
        ct_re += 1

print('AC x ' + str(ct_ac))
print('WA x ' + str(ct_wa))
print('TLE x ' + str(ct_tle))
print('RE x ' + str(ct_re))

Submission status: Accepted

Solution code:
N = int(input())
lists = []
AC = 0
TLE = 0
WA = 0
RE = 0
for i in range(N):
    S = str(input())
    lists.append(S)
for o in lists:
    if o == "AC":
        AC +=1
    elif o == "TLE":
        TLE +=1
    elif o == "WA":
        WA +=1
    elif o == "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())
X =[]
for i in range (n):
 X.append (input())
print ("AC x", X.count("AC"))
print ("WA x", X.count("WA"))
print ("TLE x", X.count("TLE"))
print ("RE x", X.count("RE"))

Submission status: Accepted

Solution code:
N = int(input())
reslist = [0,0,0,0]
alist = ['AC','WA', 'TLE','RE']
for i in range(N):
    temp = input()
    if temp == alist[0]:
        reslist[0] += 1
    elif temp == alist[1]:
        reslist[1] += 1
    elif temp == alist[2]:
        reslist[2] += 1
    else:
        reslist[3] += 1
for i in range(4):
    print(alist[i], 'x', reslist[i])

Submission status: Accepted

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

N = int(input())

S = [input().replace('\n', '') for _ in range(N)]

AC_c = 0
WA_c = 0
TLE_c = 0
RE_c = 0

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

for s in S:
    r[s] += 1

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

Submission status: Accepted

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


print(f'AC x {lst.count("AC")}')
print(f'WA x {lst.count("WA")}')
print(f'TLE x {lst.count("TLE")}')
print(f'RE x {lst.count("RE")}')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    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(f"AC x {ac}")
    print(f"WA x {wa}")
    print(f"TLE x {tle}")
    print(f"RE x {re}")
    return 0

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
A = list(input() for _ 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"))

Submission status: Accepted

Solution code:
N = int(input())
con = 0
list_s = []

while True:
  con = con + 1
  s = input()
  list_s.append(s)
  if con == N:
    break

ac = list_s.count('AC')
wa = list_s.count('WA')
tle = list_s.count('TLE')
re = list_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())
AC, WA, TLE, RE = 0, 0, 0, 0

for i in range(N):
  type = input()
  if type == "AC":
    AC += 1
    continue
  if type == "WA":
    WA += 1
    continue
  if type == "TLE":
    TLE += 1
    continue
  if type == "RE":
    RE += 1
    continue
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:
import sys
input = sys.stdin.readline

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

n = int(input())

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

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

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 S == "AC":
        count_ac += 1
    if S == "WA":
        count_wa += 1
    if S == "TLE":
        count_tle += 1
    if S == "RE":
        count_re += 1
    del S

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 = [input() for i in range(n)]
#['AC', 'TLE', 'AC', 'AC', 'WA', 'TLE']

AC = str(s.count('AC'))
WA = str(s.count('WA'))
TLE = str(s.count('TLE'))
RE = str(s.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())
S=[input() for i in range(N)]
C0=str(S.count("AC"))
C1=str(S.count("WA"))
C2=str(S.count("TLE"))
C3=str(S.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())
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 main():
    N = int(input())
    AC = 0
    WA = 0
    TLE = 0
    RE = 0
    for i in range(N):
        St = input()
        if St == 'AC':
            AC += 1
        elif St == 'WA':
            WA += 1
        elif St == 'TLE':
            TLE += 1
        elif St == 'RE':
            RE += 1
        else:
            Er += 1
    print('AC x', AC)
    print('WA x', WA)
    print('TLE x', TLE)
    print('RE x', RE)
main()

Submission status: Accepted

Solution code:
N = int(input())
S = []
for _ in range(N):
    S.append(input())
    
print("AC x " + str(S.count("AC")))
print("WA x " + str(S.count("WA")))
print("TLE x " + str(S.count("TLE")))
print("RE x " + str(S.count("RE")))

Submission status: Accepted

Solution code:
n = int(input())
st = [input() for i in range(n)]
print('AC x ' + str(st.count("AC")))
print('WA x ' + str(st.count("WA")))
print('TLE x ' + str(st.count("TLE")))
print('RE x ' + str(st.count("RE")))

Submission status: Accepted

Solution code:
n = int(input())
s=[]
for x in range(n):
    s.append(input())
a={"AC":0, "WA":0,"TLE":0,"RE":0}
for x in s:
    a[x]+=1
print("AC x %s" % a["AC"])
print("WA x %s" % a["WA"])
print("TLE x %s" % a["TLE"])
print("RE x %s" % a["RE"])

Submission status: Accepted

Solution code:
kaisuu = input()
result = list()

suu = [0, 0, 0, 0]
judge = ["AC", "WA", "TLE", "RE"]

for i in range(int(kaisuu)):
    result.append(input())

for i in range(int(kaisuu)):
    if result[i] == "AC":
        suu[0] += 1
    if result[i] == "WA":
        suu[1] += 1
    if result[i] == "TLE":
        suu[2] += 1
    if result[i] == "RE":
        suu[3] += 1

for i in range(4):
    print (judge[i],"x",suu[i])

Submission status: Accepted

Solution code:
N = int(input())

AC_count = 0
WA_count = 0
TLE_count = 0
RE_count = 0

S = []
for i in range(N):
    S.append(input())
    if S[i] == 'AC':
        AC_count += 1
    elif S[i] == 'WA':
        WA_count += 1
    elif S[i] == 'TLE':
        TLE_count += 1
    elif S[i] == 'RE':
        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 = input()
n = int(n)
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    wk = input()
    if wk == "AC":
        ac +=1
    elif wk == "WA":
        wa += 1
    elif wk == "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:
N=int(input())
a = 0
w = 0
t = 0
r = 0
for i in range(N):
  S=input();
  if S[0] == "A":
    a+=1
  elif S[0] == "W":
    w+=1
  elif S[0] == "T":
    t+=1
  else:
    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())
case = []
result = ["AC","WA","TLE","RE"]
for num in range(n):
  case.append(input())
for num in range(4):
  print("{} x {}".format(result[num],case.count(result[num])))

Submission status: Accepted

Solution code:
list_num = int(input())
word_list= []
for i in range(list_num):
    word_list.append(input())
    
ac = word_list.count('AC')
wa = word_list.count('WA')
tle = word_list.count('TLE')
re = word_list.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())
S = [0] * N

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

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

for x in range(len(S)):
    if S[x] == ['A', 'C']:
        ACcount += 1
    elif S[x] == ['W','A']:
        WAcount += 1
    elif S[x] == ['T','L','E']:
        TLEcount += 1
    elif S[x] == ['R','E']:
        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())
l = [input() for i in range(n)]

ac = l.count("AC")
wa = l.count("WA")
tle = l.count("TLE")
re = l.count("RE")

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 i in range(N)]

s = Counter(S)

print('AC x ',end='')
print(s['AC'])
print('WA x ', end='')
print(s['WA'])
print('TLE x ',end='')
print(s['TLE'])
print('RE x ', end='')
print(s['RE'])

Submission status: Accepted

Solution code:
from collections import Counter
l=[]
for _ in range(int(input())):
    l.append(input())
d=Counter(l)
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 sys
S = []
N = int(input())

for i in sys.stdin:
    S.append(i.replace("\n",""))

AC = []
WA = []
TLE = []
RE = []

S.sort()
P = [AC,TLE,RE,WA]

for i in S:
    if i == "AC":
        AC.append(0)
    elif i == "WA":
        WA.append(0)
    elif i == "TLE":
        TLE.append(0)
    else:
        RE.append(0)    
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:
import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections
import copy


if __name__ == "__main__":
    n = int(input())
    s = [input() for i in range(n)]
    c  = ["AC","WA","TLE","RE"]
    cnt = [0]*4
    for i in s:
        if i == "AC":
            cnt[0]+=1
        elif i == "WA":
            cnt[1]+=1
        elif i == "TLE":
            cnt[2]+=1
        else:
            cnt[3]+=1
    print("AC x " + str(cnt[0]) )
    print("WA x " + str(cnt[1]) )
    print("TLE x " + str(cnt[2]) )
    print("RE x " + str(cnt[3]) )

Submission status: Accepted

Solution code:
list = []
words = ['AC','WA','TLE','RE']
words_count = {'AC':0,'WA':0,'TLE':0,'RE':0}
    
try:
    while True:
      val = input()
      if val:
        list.append(val)
      else:
        break
except EOFError:
    pass

for i in range(1,len(list)):
  for word in words:
    if list[i] == word:
      words_count[word] += 1

for k,v in words_count.items():
  print("{key} x {value}".format(key = k,value= v))

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for i in range(n)]
ac = []
wa =[]
tle = []
re = []
for i in range(n):
    if s[i] == 'AC':
        ac.append(s[i])
    elif s[i] == 'WA':
        wa.append(s[i])
    elif s[i] == 'TLE':
        tle.append(s[i])
    else:
        re.append(s[i])
print(f'AC x {len(ac)}')
print(f'WA x {len(wa)}')
print(f'TLE x {len(tle)}')
print(f'RE x {len(re)}')

Submission status: Accepted

Solution code:
n=int(input())
a,b,c,d=0,0,0,0
for _ in range(n):
    n=input()
    if n=="AC":
        a+=1
    elif n=="WA":
        b+=1
    elif n=="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())
l=[]
keys=['AC','WA','TLE','RE']
for i in range(n):
  x=(input())
  l.append(x)
s=dict.fromkeys(keys, 0)
for i in l:
  if i in s:
    s[i]+=1
for k,v in s.items():
  print(k,"x",v)

Submission status: Accepted

Solution code:
N= int(input())
s = [input() for i 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_list = []
WA_list = []
TLE_list = []
RE_list = []

for _ in range(N) :
    S = str(input())
    if S == 'AC' :
        AC_list.append(S)
    elif S == 'WA' :
        WA_list.append(S)
    elif S == 'TLE' :
        TLE_list.append(S)
    elif S == 'RE' :
        RE_list.append(S)

print('AC x ' + str(len(AC_list)))
print('WA x ' + str(len(WA_list)))
print('TLE x ' + str(len(TLE_list)))
print('RE x ' + str(len(RE_list)))

Submission status: Accepted

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

Submission status: Accepted

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


#sys.setrecursionlimit(10**9)
#from functools import lru_cache

def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def MF(): return map(float,input().split())
def LI(): return list(map(int,input().split()))
def LF(): return list(map(float,input().split()))
def TI(): return tuple(map(int,input().split()))
# rstrip().decode()

#import numpy as np
from collections import defaultdict

def main():
	n=II()
	d=defaultdict(int)
	for _ in range(n):
		d[input()]+=1


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






if __name__ == "__main__":
	main()

Submission status: Accepted

Solution code:

n = int(input())

a,b,c,d = 0,0,0,0
for _ in range(n):
    t = input()
    if t=='AC':
        a += 1
    elif t=='WA':
        b += 1
    elif t=='TLE':
        c += 1
    elif t=='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())
sum = [0,0,0,0]
for i in range(n):
  x = input()
  if x == 'AC':
      sum[0]+=1
  elif x == 'WA':
      sum[1]+=1
  elif x == 'TLE':
      sum[2]+=1
  elif x== 'RE':
      sum[3]+=1
print('AC x '+str(sum[0]))
print('WA x '+str(sum[1]))
print('TLE x '+str(sum[2]))
print('RE x '+str(sum[3]))

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for i in range(n)]
AC = 0
WA = 0
TLE = 0
RE = 0
for t in s:
    if (t == 'AC'):
        AC += 1
    elif (t == 'WA'):
        WA += 1
    elif (t == '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=0
c1=0
c2=0
c3=0
while(n>0):
    s=input()
    if(s=="AC"):
        c0+=1
    elif(s=="WA"):
        c1+=1
    elif(s=="TLE"):
        c2+=1
    elif(s=="RE"):
        c3+=1
    n=n-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())
s=[]

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

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


for a in dic.keys():
    dic[a]=s.count(a)


for a,b in dic.items():
    print(str(a)+" x "+str(b))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# atcoder 
# Türkler var mı?
# Herkese memnün oldum
import sys

iimr = lambda: map(int, sys.stdin.readline().rstrip().split())
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)


def 関数(n):
    ac = 0
    wa = 0
    tle = 0
    re = 0

    for i in range(n):
        keesu = sys.stdin.readline().rstrip()
        if keesu == "AC": 
            ac += 1
        elif keesu == "WA":
            wa += 1
        elif keesu == "TLE":
            tle += 1
        elif keesu == "RE":
            re += 1
        else:
            print("Erreur: ", keesu)

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

def çözmek():
 
    N = int(input())

    関数(N)

if __name__ == "__main__":
    çözmek()

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(str(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())
memo = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}

for _ in range(N):
  memo[input()] += 1
  
for k, v in memo.items():
  print('{k} x {v}'.format(k=k, v=v))

Submission status: Accepted

Solution code:
N = int(input())

d = 0
e = 0
r = 0
f = 0

for i in range(N):
    a = str(input())
    if a == 'AC':
        d +=1
    elif a == 'WA':
        e += 1
    elif a == 'TLE':
        r += 1
    else:
        f += 1
        
print("AC x " +str(d))
print("WA x " + str(e))
print("TLE x " + str(r))
print("RE x " + str(f))

Submission status: Accepted

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

# S_list = [input() for i in range(N)]
check_list = ['AC', 'WA', 'TLE', 'RE']
count_list = [0, 0, 0, 0]

for i in range(N):
    flag = 0
    S = input()
    while flag<4:
        if S==check_list[flag]:
            count_list[flag] += 1
            break;
        else:
            flag += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)]
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())

AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N):
  S = input()

  if S == "AC":
    AC += 1
  elif S == "WA":
    WA +=1
  elif S == "TLE":
    TLE +=1
  else:
    RE +=1

print("AC x " + str(AC))
print("WA x " + str(WA))
print("TLE x " + str(TLE))
print("RE x " + str(RE))

Submission status: Accepted

Solution code:
n = int(input())
ac = 0
tle = 0
wa = 0
re = 0
for _ in range(n):
    user = input()
    if user == "AC":
        ac += 1
    elif user == "TLE":
        tle += 1
    elif user == "WA":
        wa += 1
    else:
        re += 1
print("AC x {} \nWA x {} \nTLE x {} \nRE x {}".format(ac, wa, tle, re))

Submission status: Accepted

Solution code:
N = int(input())
C=[input() for _ in range(N)]

ac = C.count("AC")
wa = C.count("WA")
tle = C.count("TLE")
re = C.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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n = int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  a = input()
  if a == 'AC':
    ac=ac+1
  elif a == 'WA':
    wa=wa+1
  elif a == 'TLE':
    tle=tle+1
  elif a == 'RE':
    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())
s = []
for i in range(n):
    s.append(str(input()))

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

for i in range(n):
 
    if str(s[i]) == 'AC': 
        ac += 1
    if str(s[i]) == 'WA': 
        wa += 1
    if str(s[i]) == 'TLE': 
        tle += 1
    if str(s[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:
M = int(input())
#リストAにappend()を使って格納していく
a = [input() for i in range(M)]

AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(M):
    if(a[i] == 'AC'):
        AC+=1
    elif(a[i] == 'WA'):
        WA+=1
    elif(a[i] == 'TLE'):
        TLE+=1
    elif(a[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:
nn = int(input())
ss = [input() for _ in range(nn)]

from collections import Counter

cc = Counter(ss)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = [input() for i in range(n)]
AC,WA,TLE,RE = 0,0,0,0

for i in s:
    if i == "AC":
        AC += 1
    elif i == "WA":
        WA += 1
    elif 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())
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 %s"%a)
print("WA x %s"%b)
print("TLE x %s"%c)
print("RE x %s"%d)

Submission status: Accepted

Solution code:
n = int(input())

c0 = 0
c1 = 0
c2 = 0
c3 = 0

for i in range(n):
    a = input()
    if(a == 'AC'):
        c0 += 1
    elif(a == 'WA'):
        c1 += 1
    elif(a == 'TLE'):
        c2 += 1
    elif(a == '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:
num = int(input())
list1=[]
for i in range(num):
	x = input()
	list1.append(x)
print("AC x "+str(list1.count("AC")))
print("WA x "+str(list1.count("WA")))
print("TLE x "+str(list1.count("TLE")))
print("RE x "+str(list1.count("RE")))