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 collections

n=int(input())
str_list = [input() for _ in range(n)]
c = collections.Counter(str_list)



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())
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())
n_list = [input() for _ in range(n)]

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

Submission status: Accepted

Solution code:
import sys
from collections import Counter
import math

counts = Counter(line.strip() for line in sys.stdin)

for key in ["AC", "WA", "TLE", "RE"]:
  if key not in counts:
    print("{} x 0".format(key))
  else:
    print("{} x {}".format(key, counts[key]))

Submission status: Accepted

Solution code:
n = int(input())

d = dict()

for _ in range(n):
    k = input()
    if d.get(k):
        d[k] += 1
    else:
        d[k] = 1

for kk in ['AC', 'WA', 'TLE', 'RE']:
    if d.get(kk):
        print(kk + ' x ' + str(d.get(kk)))
    else:
        print(kk + ' x 0')

Submission status: Accepted

Solution code:
AC = 0
WA = 0
TLE = 0
RE = 0

n = int(input())

for i in range(n):
  d = input()
  if d == 'AC':
    AC += 1
  elif d == 'WA':
    WA += 1
  elif d == '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())

count = 0
S = []

while count < N:
    S.append(input())
    count = count + 1


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())
s = [input() for _ in range(n)]
from collections import Counter
c = Counter(s)

if 'AC' in c.keys():
    print('AC x', c['AC'])
else:
    print('AC x 0')
if 'WA' in c.keys():
    print('WA x', c['WA'])
else:
    print('WA x 0')
if 'TLE' in c.keys():
    print('TLE x', c['TLE'])
else:
    print('TLE x 0')
if 'RE' in c.keys():
    print('RE x', c['RE'])
else:
    print('RE x 0')

Submission status: Accepted

Solution code:
from copy import deepcopy
import math
import string
import collections
from collections import Counter
from collections import deque
from decimal import Decimal
import sys
import fractions
from operator import itemgetter
import itertools
import copy


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


def gcd(a, b):
    while(b != 0):
        a, b = b, a % b
    return a


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
n = int(input())
tmp = [0]*4
for _ in range(n):
    s = input()
    if s == 'AC':
        tmp[0] += 1
    if s == 'WA':
        tmp[1] += 1
    if s == 'TLE':
        tmp[2] += 1
    if s == 'RE':
        tmp[3] += 1

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

Submission status: Accepted

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

print("AC x {}".format(ansDict["AC"] or 0))
print("WA x {}".format(ansDict["WA"] or 0))
print("TLE x {}".format(ansDict["TLE"] or 0))
print("RE x {}".format(ansDict["RE"] or 0))

Submission status: Accepted

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

print(f"AC x {ans['AC']}")
print(f"WA x {ans['WA']}")
print(f"TLE x {ans['TLE']}")
print(f"RE x {ans['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:
n = int(input())

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

for i in range(n):
  x = input()
  if x == "RE": re+=1
  if x == "TLE": tle+=1
  if x == "AC": ac+=1
  if x == "WA": wa+=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 = []
C0 = 0
C1 = 0
C2 = 0
C3 = 0

for i in range(n):
  m = input()
  S.append(m)
  if m == 'AC':
    C0 += 1
  elif m == 'WA':
    C1 += 1
  elif m == 'TLE':
    C2 += 1
  elif m == 'RE':
    C3 += 1
    
print('AC x', C0)
print('WA x', C1)
print('TLE x', C2)
print('RE x', C3)

Submission status: Accepted

Solution code:
import numpy as np

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 {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())
ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(N):
    s = input()
    if(s == 'AC'):
        ans['AC'] = ans['AC'] + 1
    elif(s == 'WA'):
        ans['WA'] = ans['WA'] + 1
    elif(s == 'TLE'):
        ans['TLE'] = ans['TLE'] + 1
    elif(s == 'RE'):
        ans['RE'] = ans['RE'] + 1
print('AC x {}' .format(ans['AC']))
print('WA x {}'.format(ans['WA']))
print('TLE x {}'.format(ans['TLE']))
print('RE x {}'.format(ans['RE']))

Submission status: Accepted

Solution code:
def resolve():
    n = int(input())
    listS = []
    for i in range(n):
        s = input()
        listS.append(s)
    ac = listS.count("AC")
    tle = listS.count("TLE")
    wa = listS.count("WA")
    re = listS.count("RE")
    print("AC x {}".format(ac))
    print("WA x {}".format(wa))
    print("TLE x {}".format(tle))
    print("RE x {}".format(re))
    
resolve()

Submission status: Accepted

Solution code:
N = int(input())

A = [0,0,0,0]

for i in range (0, N):
    S = str(input())
    if S == 'AC':
        A[0]+=1
    if S == 'WA':
        A[1]+=1
    if S == 'TLE':
        A[2]+=1
    if S == 'RE':
        A[3]+=1

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

Submission status: Accepted

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

import collections

C = collections.Counter(S)

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

Submission status: Accepted

Solution code:
N = int(input())

a = [0] * 4

for i in range(N):
  result = input()
  if (result == 'AC'):
    a[0] += 1
  elif (result == 'WA'):
    a[1] += 1
  elif (result == 'TLE'):
    a[2] += 1
  else:
    a[3] += 1

print('AC x {0}\nWA x {1}\nTLE x {2}\nRE x {3}'.format(a[0], a[1], a[2], a[3]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    import sys
    N=int(sys.stdin.readline())
    dic={
        'AC':0,
        'WA':0,
        'TLE':0,
        'RE':0,
    }
    for i in range(N):
        S=sys.stdin.readline()
        dic[S.strip()]+=1
    
    for key,val in dic.items():
        print('{} x {}'.format(key,val))

main()

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

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

Submission status: Accepted

Solution code:
# 幅優先探索（行きがけ）
import collections
import sys
import copy
import re


def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())


def main():
    N = I()
    Si = [0]*(4)
    s = ["AC", "WA", "TLE", "RE"]
    for _ in range(N):
        a = S()
        for j, ss in enumerate(s):
            if a == ss:
                Si[j] += 1
                break

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

for s in str_list:
    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}")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
    S = input()
    if S == "AC":
        AC+=1
    elif S == "WA":
        WA+=1
    elif S == "TLE":
        TLE +=1
    else:
        RE +=1

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

Submission status: Accepted

Solution code:
n = int(input()) #1行目のNを取得する
#print(n)
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
  x = input()
  #print(x,i)
  if x == 'AC':
    ac +=1
  if x == 'WA':
    wa +=1
  if x == 'TLE':
    tle +=1
  if x == 'RE':
    re +=1
print('AC x',ac)
print('WA x',wa)
print('TLE x',tle)
print('RE x',re)

Submission status: Accepted

Solution code:
num = input().rstrip()
line = []
for i in range(int(num)):
    line.append(input().rstrip())
line_ac = [s for s in line if "AC" in s]
line_wa = [s for s in line if "WA" in s]
line_tle = [s for s in line if "TLE" in s]
line_re = [s for s in line if "RE" in s]

print("AC x " + str(len(line_ac)))
print("WA x " + str(len(line_wa)))
print("TLE x " + str(len(line_tle)))
print("RE x " + str(len(line_re)))

Submission status: Accepted

Solution code:
n=int(input())
S=[input() for i in range(n)]
a=[0]*4
a[0]="AC"
a[1]="WA"
a[2]="TLE"
a[3]="RE"
c=[0]*4
for i in range(4):
  c[i]=S.count(a[i])
for i in range(4):
  print(a[i],"","x","",c[i])

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for i in range(N)]
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(N) :
    if S[i] == 'AC' :
        AC += 1
    elif S[i] == 'WA' :
        WA += 1
    elif S[i] == 'TLE' :
        TLE += 1
    elif S[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:
import os

N = int(input())
S = [0] * N

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

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

for i in S:
    if i == "AC":
        AC+=1
    elif i == "WA":
        WA+=1
    elif i == "TLE":
        TLE+=1
    elif i == "RE":
        RE+=1

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
  str = input()
  if str == "AC":
    AC += 1
  elif str == "WA":
    WA += 1
  elif str == "TLE":
    TLE += 1
  elif str == "RE":
    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:
from collections import defaultdict
N = int(input())
s = defaultdict(int)
for i in range(N):
    a = input()
    s[a] += 1
ls = ['AC', 'WA', 'TLE', 'RE']
for x in ls:
    print(x + ' x ' + str(s[x]))

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:
li=["AC","WA","TLE","RE"]
l=[0]*4
for i in range(int(input())):
    n=input()
    if n=="AC":l[0]+=1
    if n == "WA": l[1] += 1
    if n == "TLE": l[2] += 1
    if n == "RE": l[3] += 1
for i in range(4):
    print(li[i],"x",l[i])

Submission status: Accepted

Solution code:
d = {}
d["AC"] = 0
d["WA"] = 0
d["TLE"] = 0
d["RE"] = 0

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

for s in ["AC", "WA", "TLE", "RE"]:
    print(s + " x " + str(d[s]))

Submission status: Accepted

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

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

for i in range(n):
    if s[i] == 'AC':
        c0 += 1
    if s[i] == 'WA':
        c1 += 1
    if s[i] == 'TLE':
        c2 += 1
    if s[i] == 'RE':
        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())
S = [input() for i in range(N)]

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

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

Submission status: Accepted

Solution code:
_num_of_cases = int(input())
_AC = 0
_WA = 0
_TLE = 0
_RE = 0
for _i in range(_num_of_cases):
  _result = input()
  if _result == "AC":
    _AC += 1
  elif _result == "WA":
    _WA += 1
  elif _result == "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())
c0 = 0
c1 = 0
c2 = 0
c3 = 0
for _ in range(n):
    word = input()
    if word=='AC':
        c0 +=1
    elif word == 'WA':
        c1 +=1
    elif word == '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_list = []
for i in range(n):
    s_list.append(input())

# print(s_list.count("AC"))

# print(s_list)

print("AC x {0}".format(s_list.count("AC")))
print("WA x {0}".format(s_list.count("WA")))
print("TLE x {0}".format(s_list.count("TLE"))) 
print("RE x {0}".format(s_list.count("RE")))

# print("AC x {0}".format(”AC” in s_list))
# print("WA x {0}".format(”WA” in s_list))
# print("TLE x {0}".format(”TLE” in s_list)) 
# print("RE x {0}".format(”RE” in s_list))

Submission status: Accepted

Solution code:
n = int(input())

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

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

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

Submission status: Accepted

Solution code:
N = int(input())
S = []
for i in range(N):
    S.append(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())
p = []
for i in range(n):
    a = input()
    p.append(a)
ac = 0
wa = 0
tle = 0
re = 0
for i in range(n):
    if p[i] == 'AC':
        ac += 1
    elif p[i] == 'WA':
        wa += 1
    elif p[i] == 'TLE':
        tle += 1
    else:
        re += 1
ans = 'AC x'
print(ans,str(ac), sep = ' ',)
ans = 'WA x'
print(ans,str(wa), sep = ' ')
ans = 'TLE x'
print(ans,str(tle), sep = ' ')
ans = 'RE x'
print(ans,str(re), sep = ' ')

Submission status: Accepted

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

Submission status: Accepted

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

count_ac = 0
count_wa = 0
count_tle = 0
count_re = 0

for i in lists:
    if i == 'AC':
        count_ac += 1
    elif i == 'WA':
        count_wa += 1
    elif i == 'TLE':
        count_tle += 1
    elif i == 'RE':
        count_re += 1

print('AC x ' + str(count_ac))
print('WA x ' + str(count_wa))
print('TLE x ' + str(count_tle))
print('RE x ' + str(count_re))

Submission status: Accepted

Solution code:
N=int(input())
a=0
b=0
c=0
d=0
for i in range(N):
    A=input()
    if A=="AC":
        a+=1
    elif A=="WA":
        b+=1
    elif A=="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())
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())
result = {}
l = ['AC','WA','TLE','RE']
for i in l:
    result[i] = 0
for _ in range(n):
    result[input()] += 1
for i in l:
    print(f'{i} x {result[i]}')

Submission status: Accepted

Solution code:
z=[]
ac=[]
wa=[]
tle=[]
re=[]
a=int(input())
for i in range(a):
    b=input()
    z.append(b)
for i in z:
    if i=='AC':
        ac.append(1)
for i in z:
    if i=='WA':
        wa.append(1)
for i in z:
    if i=='TLE':
        tle.append(1)
for i in z:
    if i=='RE':
        re.append(1)
        
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())

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:
N = int(input())
ac,wa,tle,re = [0 for i in range(4)]
for i in range(N):
    val = input()
    if val == "AC":
        ac += 1
    elif val == "WA":
        wa += 1
    elif val == "TLE":
        tle += 1
    elif val == "RE":
        re += 1
    else:
        pass
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):
  st= str(input())
  l.append(st)
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:
import sys
import math
import fractions
from collections import deque
from collections import defaultdict
sys.setrecursionlimit(10**7)

N = int(input())

d = defaultdict(int)
for i in range(N):
    S = input()
    d[S] += 1

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

Submission status: Accepted

Solution code:
n = int(input())

statuses = []

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

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

for status in statuses:
    status_count[status] += 1

for key, value in status_count.items():
    print('{s} x {n}'.format(s=key, n=value))

Submission status: Accepted

Solution code:
N=int(input())
l=[]
for i in range(N):
  a=input()
  l.append(a)
AC_num=l.count("AC")
WA_num=l.count("WA")
TLE_num=l.count("TLE")
RE_num=l.count("RE")
print("AC x",AC_num)
print("WA x",WA_num)
print("TLE x",TLE_num)
print("RE x",RE_num)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys

def main():
  # Xはもっとも近い整数，Nは与えられるP
  N = int(input())
  AC=0
  WA=0
  TLE=0
  RE=0

  for i in range(N):
    S = input()
    if S == "AC":
      AC = AC + 1
    elif S == "WA":
      WA = WA + 1
    elif S == "TLE":
      TLE = TLE + 1
    elif S == "RE":
      RE = RE + 1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
s = [list( input().split() ) for i in range(n)]
c = [0, 0, 0, 0]

for i in range(n):
  if s[i] == ['AC']:
    c[0] += 1
  if s[i] == ['WA']:
    c[1] += 1
  if s[i] == ['TLE']:
    c[2] += 1
  if s[i] == ['RE']:
    c[3] += 1
    
print('AC x', c[0])
print('WA x', c[1])
print('TLE x', c[2])
print('RE x', c[3])

Submission status: Accepted

Solution code:

import collections

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



c = collections.Counter(li)




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:
di = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
n = int(input())
for _ in range(n):
    di[input()] += 1
[print(f"{key} x {val}") for key,val in di.items()]

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
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:
import sys
n = int(sys.stdin.readline().rstrip("\n"))
result = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for _ in range(n):
    s = sys.stdin.readline().rstrip("\n")
    result[s] += 1
for r in result.keys():
    print(r+" x "+str(result[r]))

Submission status: Accepted

Solution code:
import collections

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

for i in range(N):
  j = input()
  judge.append(j)

#print(judge)

count = collections.Counter(judge)

#print(count)

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

Submission status: Accepted

Solution code:
N = int(input())
result = [input() for i in range(N)]
def f(s, result):
    return '%s x %d'%(s, result.count(s))
print(f('AC', result))
print(f('WA', result))
print(f('TLE', result))
print(f('RE', result))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
    S = input()
    d[S] = d.get(S, 0) + 1

for x, y in d.items():
    print(x, 'x', y)

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:
T = {"AC":0, "WA":0, "TLE":0, "RE":0}
N = int(input())
for i in range(N):
    s = input()
    T[s] += 1

for i, j in T.items():
    print("{0} x {1}".format(i ,j))

Submission status: Accepted

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


for i in range (N):
    _=input()
    dic[_]+=1


print('AC x {0}'.format(dic['AC']))
print('WA x {0}'.format(dic['WA']))
print('TLE x {0}'.format(dic['TLE']))
print('RE x {0}'.format(dic['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
  if S == "WA":
    wa += 1
  if S == "TLE":
    tle += 1
  if S == "RE":
    re += 1
print("AC x", ac)
print("WA x", wa)
print("TLE x", tle)
print("RE x", re)

Submission status: Accepted

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

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
    elif s[i]=="RE":
        re += 1

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

Submission status: Accepted

Solution code:
N = int(input())
s = [input() for i in range(N)]
a, w, t, r = 0, 0, 0, 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), "WA x "+str(w), "TLE x "+str(t), "RE x "+str(r), sep="\n")

Submission status: Accepted

Solution code:
n=eval(input())
arr=[]
for i in range(n):
    arr+=[input()]
a=arr.count("AC")
b=arr.count("WA")
c=arr.count("TLE")
d=arr.count("RE")
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())
lists=[]
for i in range(n):
  lists.append(input())
AC=lists.count('AC')
WA=lists.count('WA')
TLE=lists.count('TLE')
RE=lists.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())
a = [0,0,0,0]
for i in range(n):
  s = input()
  if s=="AC":
    a[0] += 1
  elif s=="WA":
    a[1] += 1
  elif s=="TLE":
    a[2] += 1
  else:
    a[3] += 1
print("AC x ",end="")
print(a[0])
print("WA x ",end="")
print(a[1])
print("TLE x ",end="")
print(a[2])
print("RE x ",end="")
print(a[3])

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline

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

    for _ in range(N):
        S.append(input())
    print("AC"+" x "+ str(S.count('AC\n')))
    print("WA"+" x "+ str(S.count('WA\n')))
    print("TLE"+" x "+ str(S.count('TLE\n')))
    print("RE"+" x "+ str(S.count('RE\n')))


    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


n = int(input())
l = [None]*n
for i in range(n):
    l[i] = input()
from collections import Counter
c = Counter(l)
for k in ("AC", "WA", "TLE", "RE"):
    print("%s x %s" % (k, c[k] if k in c else 0))

Submission status: Accepted

Solution code:
N = int(input())
count = [0,0,0,0]
status = ['AC', 'WA', 'TLE', 'RE']
for i in range(N):
    S = input()
    for j in range(4):
        if S == status[j]: count[j]+=1

for j in range(4):
    print(status[j], 'x', count[j])

Submission status: Accepted

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

for _ in range(loop):
  judge = input()
  if judge == 'AC':
    ac += 1
  elif judge == 'WA':
    wa += 1
  elif judge == 'TLE':
  	tle += 1
  elif judge == 'RE':
    re += 1
    
print('AC x {}'.format(ac))
print('WA x {}'.format(wa))
print('TLE x {}'.format(tle))
print('RE x {}'.format(re))

Submission status: Accepted

Solution code:
N = int(input())

dic = {}
for i in range(N):
    s = input()
    
    if s not in dic:
        dic[s] = 1
    else:
        dic[s] += 1

if 'AC' not in dic:
    dic['AC'] = 0
if 'WA' not in dic:
    dic['WA'] = 0
if 'TLE' not in dic:
    dic['TLE'] = 0
if 'RE' not in dic:
    dic['RE'] = 0
    
AC = dic['AC']
print(f'AC x {AC}')

WA = dic['WA']
print(f'WA x {WA}')

TLE = dic['TLE']
print(f'TLE x {TLE}')

RE = dic['RE']
print(f'RE x {RE}')

Submission status: Accepted

Solution code:
import collections

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

count = collections.Counter(S)
for s in ['AC', 'WA', 'TLE', 'RE']:
    n = count[s]
    print(f'{s} x {n}')

Submission status: Accepted

Solution code:
a = int(input())
X = [input() for i in range(a)]
ac = X.count('AC') 
wa = X.count('WA')
tle = X.count('TLE')
re = X.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())
AC=0
WA=0
TLE=0
RE=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



ans="AC x "+str(AC)+"\n"+"WA x "+str(WA)+"\n"+"TLE x "+str(TLE)+"\n"+"RE x "+str(RE)+"\n"
print("{}".format(ans))

Submission status: Accepted

Solution code:
n = int(input())
t = {"AC":0, "WA":1, "TLE":2, "RE":3}
u = ["AC", "WA", "TLE", "RE"]
ans = [0]*4
for _ in range(n):
    ans[t[input()]] += 1
for i in range(4):
    print(u[i], "x", ans[i])

Submission status: Accepted

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

Submission status: Accepted

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

n_ac = S.count("AC")
n_wa = S.count("WA")
n_tle = S.count("TLE")
n_re = S.count("RE")

print(f"AC x {n_ac}")
print(f"WA x {n_wa}")
print(f"TLE x {n_tle}")
print(f"RE x {n_re}")

Submission status: Accepted

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