Problem:


Score : 200 points

Problem Statement

Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.

The problem has N test cases.

For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively.

See the Output section for the output format.

Constraints

1 \leq N \leq 10^5

S_i is AC, WA, TLE, or RE.

Input

Input is given from Standard Input in the following format:

N
S_1
\vdots
S_N

Output

Let C_0, C_1, C_2, and C_3 be the numbers of test cases for which the verdict is AC, WA, TLE, and RE, respectively. Print the following:

AC x C_0
WA x C_1
TLE x C_2
RE x C_3

Sample Input 1

6
AC
TLE
AC
AC
WA
TLE

Sample Output 1

AC x 3
WA x 1
TLE x 2
RE x 0

We have 3, 1, 2, and 0 test case(s) for which the verdict is AC, WA, TLE, and RE, respectively.

Sample Input 2

10
AC
AC
AC
AC
AC
AC
AC
AC
AC
AC

Sample Output 2

AC x 10
WA x 0
TLE x 0
RE x 0



Sample input:
6
AC
TLE
AC
AC
WA
TLE


Sample output:
AC x 3
WA x 1
TLE x 2
RE x 0

Submission status: Accepted

Solution code:
N = int(input())
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())
inp = {}
for i in range(n):
    a = input()
    if inp.get(a) is None:
        inp[a] = 0
    inp[a] += 1
print(f"AC x {0 if inp.get('AC') is None else inp.get('AC')}")
print(f"WA x {0 if inp.get('WA') is None else inp.get('WA')}")
print(f"TLE x {0 if inp.get('TLE') is None else inp.get('TLE')}")
print(f"RE x {0 if inp.get('RE') is None else inp.get('RE')}")

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import math,sys
from itertools import permutations, combinations
from collections import defaultdict,deque,OrderedDict
from os import path
import bisect as bi
import heapq 
def yes():print('YES')
def no():print('NO')
if (path.exists('input.txt')): 
    #------------------Sublime--------------------------------------#
    sys.stdin=open('input.txt','r');sys.stdout=open('output.txt','w');
    def I():return (int(input()))
    def In():return(map(int,input().split()))
else:
    #------------------PYPY FAst I/o--------------------------------#
    def I():return (int(stdin.readline()))
    def In():return(map(int,stdin.readline().split()))

def dict(a):
    d={}
    for x in a:
        if d.get(x,-1)!=-1:
            d[x]+=1
        else:
            d[x]=1
    return d

def main():
    try:
        l=[]
        n=I()
        for x in range(n):
            l.append(input())
        #d=dict(l)
        d={}
        temp=['AC','WA','TLE','RE']
        for x in temp:
            d[x]=0
        for x in l:
            d[x]+=1
        print('AC x',d['AC'])
        print('WA x',d['WA'])
        print('TLE x',d['TLE'])
        print('RE x',d['RE'])
    except:
        pass
        
M = 998244353
P = 1000000007
 
if __name__ == '__main__':
    #for _ in range(I()):main()
    for _ in range(1):main()

Submission status: Accepted

Solution code:
import sys
import math
import collections
import heapq

def set_debug(debug_mode=False):
    if debug_mode:
        fin = open('input.txt', 'r')
        sys.stdin = fin


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


if __name__ == '__main__':
    # set_debug(True)

    # t = int(input())
    t = 1

    for ti in range(1, t + 1):
        n = int(input())

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

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

        # print(d)

        for x in ['AC', 'WA', 'TLE', 'RE']:
            print(f'{x} x {d[x]}')

Submission status: Accepted

Solution code:
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1

data = collections.Counter()
n = int(input())
for i in range(n):
  s = input()
  data[s] += 1
ansset = ["AC","WA","TLE","RE"]
for ai in ansset:
  print(ai,"x",data[ai])

Submission status: Accepted

Solution code:
N=int(input())
str_list = [input() for _ in range(N)]
AC=WA=TLE=RE=0
for i in range(N):
  if(str_list[i]=="AC"):
    AC+=1
  if(str_list[i]=="TLE"):
    TLE+=1
  if(str_list[i]=="WA"):
    WA+=1
  if(str_list[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())
dictionnaire = {"AC":0, "WA":0,"TLE":0, "RE":0}
for i in range(N):
    e = input()
    if e in dictionnaire.keys():
        dictionnaire[e] += 1
    else:
        dictionnaire[e] = 1
    
for i in dictionnaire.keys():
    print(f"{i} x {dictionnaire[i]}")

Submission status: Accepted

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

counter = Counter(list1)
for item,value in counter.items():
    if(item=='AC'):    AC+=value
    elif(item=='WA'):  WA+=value
    elif(item=="TLE"): TLE+=value
    else:
        RE+=value

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

Submission status: Accepted

Solution code:
import collections as cl
n = int(input())
d = cl.OrderedDict({"AC":0, "WA":0, "TLE":0, "RE":0})
for i in range(n):
    d[input()] += 1
for k, v in d.items():
    print(k, "x", v)

Submission status: Accepted

Solution code:
n = int(input())
AC=0
WA=0
TLE=0
RE=0
list1 = []
for _ in range(n):
    s = input()
    list1.append(s)

for i in list1:
    if(i=='AC'):    AC+=1
    elif(i=='WA'):  WA+=1
    elif(i=="TLE"): TLE+=1
    else:
        RE+=1

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

Submission status: Accepted

Solution code:
n=int(input())
A=0
R=0
T=0
W=0
for i in range(n):
    s=input()
    if s=="AC":
        A+=1
    elif s=="RE":
        R+=1
    elif s=="TLE":
        T+=1
    else:
        W+=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:
A = ['AC', 'WA', 'TLE', 'RE']
N = int(input())
ans = [0]*4
S = []
for _ in range(N):
    S += [input()]

for i in range(len(A)):
    s = A[i]
    temp = 0
    for x in S:
        if x == s:
            temp += 1
    ans[i] = temp

for i in range(len(A)):
    temp = ans[i]
    print(A[i]+" x "+str(temp))

Submission status: Accepted

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


#ord(s)

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input())
S = []
for i in range(n):
    s = input()
    S.append(s)
print("AC x "+str(S.count("AC")))
print("WA x "+str(S.count("WA")))
print("TLE x "+str(S.count("TLE")))
print("RE x "+str(S.count("RE")))

Submission status: Accepted

Solution code:
N = int(input())
list_word = ["AC","WA","TLE","RE"]
list_N = []
for i in range(N):
  list_N.append(input())
for W in list_word:
  text = f"{W} x {list_N.count(W)}"
  print(text)

Submission status: Accepted

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

A=S.count('AC')
B=S.count('WA')
C=S.count('TLE')
D=S.count('RE')

print('AC x',A)
print('WA x',B)
print('TLE x',C)
print('RE x',D)

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
s = [input() for _ in range(n)]
counter = Counter(s)
output = ['AC', 'WA', 'TLE', 'RE']

for key in output:
    print(f'{key} x {counter[key]}')

Submission status: Accepted

Solution code:
from collections import Counter

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

for j in ['AC', 'WA', 'TLE', 'RE']:
    print(j, 'x', s[j])

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    N = int(rl())
    S = [rl().rstrip() for _ in range(N)]
    
    counter = defaultdict(int)
    for si in S:
        counter[si] += 1
    
    print('AC x ' + str(counter['AC']))
    print('WA x ' + str(counter['WA']))
    print('TLE x ' + str(counter['TLE']))
    print('RE x ' + str(counter['RE']))


if __name__ == '__main__':
    solve()

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

Submission status: Accepted

Solution code:
from collections import Counter
import sys
input = sys.stdin.read
def main():
    n = int(sys.stdin.readline())
    A = input().split()
    C = Counter(A)
    for i in ["AC", "WA", "TLE", "RE"]:
        n = C[i]
        print("{} x {}".format(i, n))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    import sys
    input = sys.stdin.readline

    JUDGE = 'AC', 'WA', 'TLE', 'RE'

    ctr = dict()
    for case in JUDGE:
        ctr[case] = 0

    N = int(input())
    for _ in range(N):
        s = input().rstrip()
        ctr[s] += 1

    for case in JUDGE:
        print(case, 'x', ctr[case])


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin, stdout
import sys
INF=1e11
import bisect
def get_int(): return int(stdin.readline().strip())
def get_ints(): return map(int,stdin.readline().strip().split()) 
def get_array(): return list(map(int,stdin.readline().strip().split()))
def get_string(): return stdin.readline().strip()
def op(c): return stdout.write(c)
from collections import defaultdict 
import math
d={"AC":0,"WA":0,"TLE":0,"RE":0}
for _ in range(int(stdin.readline())):
    d[get_string()]+=1
for x in d:
    print(x,"x",d[x])

Submission status: Accepted

Solution code:

def resolve():
    N = int(input())
    S = [input() for _ in range(N)]
    word = ["AC", "WA", "TLE", "RE"]
    for w in word:
        print(w, "x", S.count(w))


if __name__ == "__main__":
    resolve()

Submission status: Accepted

Solution code:
kai = int(input())

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


for _ in range(kai):
    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(f"AC x {AC}")
print(f"WA x {WA}")
print(f"TLE x {TLE}")
print(f"RE x {RE}")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
 
N = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
 
for _ in range(N):
  str1 = input()
  if str1[0] == 'A':
    AC += 1
  elif str1[0] == 'W':
    WA += 1
  elif str1[0] == 'T':
    TLE += 1
  elif str1[0] == 'R':
    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:
def main(N):
    m = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
    for i in range(N):
        m[input()] += 1
    return m


if __name__ == "__main__":
    N = int(input())
    m = main(N)
    print("AC x {}".format(m["AC"]))
    print("WA x {}".format(m["WA"]))
    print("TLE x {}".format(m["TLE"]))
    print("RE x {}".format(m["RE"]))

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    S = [readline().strip() for _ in range(N)]

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

    return


if __name__ == '__main__':
    main()

Submission status: Accepted

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

def get_input() -> tuple:
    """
    標準入力を取得する.

    Returns:\n
        tuple: 標準入力
    """
    N = int(input())
    S = []
    for n in range(N):
        S_n = input()
        S.append(S_n)

    return N, S


def main(S: list) -> None:
    """
    メイン処理.

    Args:\n
        S (list): ジャッジ結果
    """
    # 求解処理
    for v in ["AC", "WA", "TLE", "RE"]:
        # 結果出力
        print(f"{v} x {S.count(v)}")


if __name__ == "__main__":
    # 標準入力を取得
    N, S = get_input()

    # メイン処理
    main(S)

Submission status: Accepted

Solution code:
import sys
from collections import Counter

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    S = [readline().strip() for _ in range(N)]
    
    c = Counter(S)
    
    print(f'AC x {c["AC"]}')
    print(f'WA x {c["WA"]}')
    print(f'TLE x {c["TLE"]}')
    print(f'RE x {c["RE"]}')
    
    return


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
# 標準入力を取得
N = int(input())
S = []
for n in range(N):
    S_n = input()
    S.append(S_n)

# 求解処理
for v in ["AC", "WA", "TLE", "RE"]:
    # 結果出力
    print(f"{v} x {S.count(v)}")

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
    s = input()
    idx = res.index(s)
    ans[idx] += 1

for r, n in zip(res, ans):
    print(r, 'x', n)

Submission status: Accepted

Solution code:
import collections

N = int(input())
S = [input() for x in range(N)]

C = collections.Counter(S)
keys = ["AC","WA","TLE","RE"]
for key in keys:
    print(key + " x " + str(C[key]))

Submission status: Accepted

Solution code:
n = int(input())

dict = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
for i in range(n):
  c = input()
  dict[c] = dict[c] + 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
a = 0
b = 0
c = 0
d = 0
 
for i in range(n):
    S = str(input())
    if S == 'AC':
        a += 1
    if S == 'WA':
        b += 1
    if S == 'TLE':
        c += 1
    if S == '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:
g={'AC':0,'WA':0,'TLE':0,'RE':0}
for i in range(int(input())):g[input()]+=1
for i in g:
    print(i+' x '+str(g[i]))

Submission status: Accepted

Solution code:
N=int(input())
S=[input() for i in range(N)]
judge=["AC","WA","TLE","RE"]
for j in judge:
    print("{0} x {1}".format(j,S.count(j)))

Submission status: Accepted

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

N = int(input())

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

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

Submission status: Accepted

Solution code:
L =[]

N = int(input())

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

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

Submission status: Accepted

Solution code:
from collections import defaultdict
D = defaultdict(int)
D["WA"] = 0
D["AC"] = 0
D["TLE"] = 0
D["RE"] = 0
N = int(input())
for i in range(N):
    s = input()
    D[s] += 1
print("AC x {}".format(D["AC"]))
print("WA x {}".format(D["WA"]))
print("TLE x {}".format(D["TLE"]))
print("RE x {}".format(D["RE"]))

Submission status: Accepted

Solution code:
N = int(input())
S = [input() for _ in range(N)] #N行に1文字入力したい
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())

a, b, c, d = 0, 0, 0 ,0
for _ in range(N):
  s = input()
  if s == 'AC':
    a += 1
  elif s == 'WA':
    b += 1
  elif s == 'TLE':
    c += 1
  else:
    d += 1
    
print('AC x ' + 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())
a,b,c,d=0,0,0,0
for _ in range(n):
  s=input()
  if(s=="AC"):
    a+=1
  elif(s=="WA"):
    b+=1
  elif(s=="TLE"):
    c+=1
  else:
    d+=1
print("AC x",a)
print("WA x",b)
print("TLE x",c)
print("RE x",d)

Submission status: Accepted

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())

def S(): return sys.stdin.readline().rstrip()

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

a = S.count('AC')
b = S.count('WA')
c = S.count('TLE')
d = S.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:
_,*l=open(0).read().split()
for j in ('AC','WA','TLE','RE'): print(j,'x',l.count(j))

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
ac_count = 0
wa_count = 0
tle_count = 0
re_count = 0

for _ in range(n):
    c = input()
    if c == "AC":
        ac_count += 1
    elif c == "WA":
        wa_count += 1
    elif c == "TLE":
        tle_count += 1
    else:
        re_count += 1

print("AC x {}".format(ac_count))
print("WA x {}".format(wa_count))
print("TLE x {}".format(tle_count))
print("RE x {}".format(re_count))

Submission status: Accepted

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

for _ in range(N):
  s = input()
  if s == 'AC':
    d[s] += 1
  elif s == 'WA':
    d[s] += 1
  elif s == 'TLE':
    d[s] += 1
  else:
    d[s] += 1
    
    
for k in ['AC', 'WA', 'TLE', 'RE']:
  print('{} x {}'.format(k, d[k]))

Submission status: Accepted

Solution code:
ans = {'AC': 0, 'WA': 0, 'TLE': 0, 'RE': 0}
N = int(input())
for _ in range(N):
    ans[input()] += 1
for k,v in ans.items():
    print(f'{k} x {v}')

Submission status: Accepted

Solution code:
N = int(input())
  
countAC=0
countWA=0
countTLE=0
countRE=0
for i in range(0,N):
        val = input()
        if val=="AC":
                countAC=countAC+1
        elif val=="WA":
                countWA=countWA+1
        elif val=="TLE":
                countTLE=countTLE+1
        elif val=="RE":
                countRE=countRE+1
        else:
                break
print("AC x "+str(countAC))
print("WA x "+str(countWA))
print("TLE x "+str(countTLE))
print("RE x "+str(countRE))

Submission status: Accepted

Solution code:
S = [input() for _ in range(int(input()))]
for k in ['AC','WA','TLE','RE']: print(k, 'x', S.count(k))

Submission status: Accepted

Solution code:
def actual(N, S):
    counter_dict = dict(AC=0, WA=0, TLE=0, RE=0)

    for judge_result in S:
        counter_dict[judge_result] += 1

    return '\n'.join((f'{k} x {v}' for k, v in counter_dict.items()))

N = int(input())
S = [input() for _ in range(N)]

print(actual(N, S))

Submission status: Accepted

Solution code:
def main():
    import collections
    n = int(input())
    mylist = []
    for i in range(n):
        s = input()
        mylist.append(s)
    c = collections.Counter(mylist)
    print('AC x ' + str(c['AC']))
    print('WA x ' + str(c['WA']))
    print('TLE x ' + str(c['TLE']))
    print('RE x ' + str(c['RE']))
if __name__ == "__main__":
    main()

Submission status: Accepted

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

for _ in range(N):
	table[input()] += 1
	
for result, count in table.items():
	print(f"{result} x {count}")

Submission status: Accepted

Solution code:
n=int(input())
A=0
B=0
C=0
D=0
for i in range(n):
  m=input()
  if m =="AC":
     A +=1
  elif m=="WA":
    B+=1
  elif m=="TLE":
    C +=1
  elif m=="RE":
    D +=1
 
print("AC x ",A)
print("WA x ",B)
print("TLE x ",C)
print("RE x ",D)

Submission status: Accepted

Solution code:
from collections import Counter
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:
from collections import Counter
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())
S = [input() for X in range(0,N)]
for T in ['AC','WA','TLE','RE']:
    print('{0} x {1}'.format(T,S.count(T)))

Submission status: Accepted

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

for k in ["AC", "WA", "TLE", "RE"]:
    print(f"{k} x {S.count(k)}")

Submission status: Accepted

Solution code:
n=int(input())
A=0
B=0
C=0
D=0
for i in range(n):
  m=input()
  if m =="AC":
     A +=1
  elif m=="WA":
    B+=1
  elif m=="TLE":
    C +=1
  elif m=="RE":
    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())

D = dict()
status = ["AC", "WA", "TLE", "RE"]

for s in status:
    D[s] = 0

for _ in range(N):
    S = input()
    D[S] += 1

for s in status:
    print("%s x %d" % (s, D[s]))

Submission status: Accepted

Solution code:
N = int(input())
judge_list = []
judge = ['AC', 'WA', 'TLE', 'RE']
judge_dict = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for i in range(N):
    judge_list.append(str(input()))
for k in judge:
    judge_dict[k] = judge_list.count(k)
print(f"AC x {judge_dict['AC']}")
print(f"WA x {judge_dict['WA']}")
print(f"TLE x {judge_dict['TLE']}")
print(f"RE x {judge_dict['RE']}")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
from collections import Counter

def solve(N: int, S: "List[str]"):
    c = Counter(S)
    for w in ["AC", "WA", "TLE", "RE" ]:
        print(f"{w} x {c[w]}")
    return



# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
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 = {}
for _ in range(n):
    k = input()
    if k not in S: S[k] = 0
    S[k] += 1
for k in ['AC','WA','TLE','RE']:
    print(k, 'x', S[k] if k in S else 0)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

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

for l in L.keys():
    print(l, 'x', L[l])

Submission status: Accepted

Solution code:
from collections import Counter
li=[]
d={}
t=int(input())
for i in range(t):
    p=input()
    if(p in d):
        d[p]+=1
    else:
        d[p]=1  
if('AC' not in d):
    d['AC']=0
if('WA' not in d):
    d['WA']=0
if('TLE' not in d):
    d['TLE']=0
if('RE' not in d):
    d['RE']=0
print('AC','x',d['AC'] )
print('WA','x',d['WA'])
print('TLE','x',d['TLE'])
print('RE','x',d['RE'])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
n=int(input())
cnt = Counter(input() for _ in range(n))
print(f"""AC x {cnt['AC']}
WA x {cnt['WA']}
TLE x {cnt['TLE']}
RE x {cnt['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:
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
from math import floor, sqrt, factorial, hypot, log  # log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict, deque
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint


def ceil(a, b): return (a + b - 1) // b


inf = float('inf')
mod = 10 ** 9 + 7


def pprint(*A):
    for a in A:     print(*a, sep='\n')


def INT_(n): return int(n) - 1


def MI(): return map(int, input().split())


def MF(): return map(float, input().split())


def MI_(): return map(INT_, input().split())


def LI(): return list(MI())


def LI_(): return [int(x) - 1 for x in input().split()]


def LF(): return list(MF())


def LIN(n: int): return [I() for _ in range(n)]


def LLIN(n: int): return [LI() for _ in range(n)]


def LLIN_(n: int): return [LI_() for _ in range(n)]


def LLI(): return [list(map(int, l.split())) for l in input()]


def I(): return int(input())


def F(): return float(input())


def ST(): return input().replace('\n', '')


def main():
    N = I()
    AC = 0
    WA = 0
    TLE = 0
    RE = 0
    for _ in range(N):
        S = ST()
        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)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N=int(input())
S=[input() for _ in range(N)]
for k in ['AC','WA','TLE','RE']:
    print('{0} x {1}'.format(k,S.count(k)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
ans=[0,0,0,0]
for _ in range(N):
  result=input()
  for i in range(4):
    if result==["AC","WA","TLE","RE"][i]:
      ans[i]+=1
      break
for i in range(4):
  print(["AC","WA","TLE","RE"][i]+" x "+str(ans[i]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
INF = 1 << 60
MOD = 10**9 + 7 # 998244353
sys.setrecursionlimit(2147483647)
input = lambda:sys.stdin.readline().rstrip()
def resolve():
    states = ["AC", "WA", "TLE", "RE"]
    counts = [0] * 4
    for _ in range(int(input())):
        counts[states.index(input())] += 1

    for state, count in zip(states, counts):
        print("%s x %s" % (state, count))
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
A=0
B=0
C=0
D=0
for i in range(n):
  m=input()
  if m =="AC":
     A +=1
  elif m=="WA":
    B+=1
  elif m=="TLE":
    C +=1
  elif m=="RE":
    D +=1

print("AC x ",A)
print("WA x ",B)
print("TLE x ",C)
print("RE x ",D)

Submission status: Accepted

Solution code:

ac = 0
tle = 0
wa = 0;re=0;
for _ in range(int(input())):
    x = input()
    if(x=='AC'):ac+=1
    elif(x=='TLE'):tle+=1    
    elif(x=='WA'):wa+=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:
import sys

sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
from math import floor, sqrt, factorial, hypot, log  # log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter, defaultdict, deque
from itertools import accumulate, permutations, combinations, product, combinations_with_replacement
from bisect import bisect_left, bisect_right
from copy import deepcopy
from fractions import gcd
from random import randint


def ceil(a, b): return (a + b - 1) // b


inf = float('inf')
mod = 10 ** 9 + 7


def pprint(*A):
    for a in A:     print(*a, sep='\n')


def INT_(n): return int(n) - 1


def MI(): return map(int, input().split())


def MF(): return map(float, input().split())


def MI_(): return map(INT_, input().split())


def LI(): return list(MI())


def LI_(): return [int(x) - 1 for x in input().split()]


def LF(): return list(MF())


def LIN(n: int): return [I() for _ in range(n)]


def LLIN(n: int): return [LI() for _ in range(n)]


def LLIN_(n: int): return [LI_() for _ in range(n)]


def LLI(): return [list(map(int, l.split())) for l in input()]


def I(): return int(input())


def F(): return float(input())


def ST(): return input().replace('\n', '')


def main():
    N = I()
    S = []
    for _ in range(N):
        S.append(ST())
    cnt = Counter(S)
    print("AC x", cnt['AC'])
    print("WA x", cnt['WA'])
    print("TLE x", cnt['TLE'])
    print("RE x", cnt['RE'])

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict
d = defaultdict(int)
N = int(input())
for n in range(N):
    S = input()
    d[S] += 1
for s in ["AC", "WA", "TLE", "RE"]:
    print(s + " x " + str(d[s]))