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())
from collections import defaultdict
d = defaultdict(int)
for _ in range(N):
  d[input()] += 1

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
c1=0
c2=0
c3=0
c4=0
n=int(input())
for i in range(n):
  s=str(input())
  if s=="AC":
    c1+=1
  elif s=="WA":
    c2+=1
  elif s=="TLE":
    c3+=1
  elif s=="RE":
    c4+=1
print("AC x " +str(c1))
print("WA x " +str(c2))
print("TLE x " +str(c3))
print("RE x " +str(c4))

Submission status: Accepted

Solution code:
from collections import defaultdict

N = int(input())

result = defaultdict(int)

for _ in range(N):
    s = input()
    result[s] += 1

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

for c in kind:
    print(c, "x", str(result[c]))

Submission status: Accepted

Solution code:
from sys import stdin, stdout

int_in = lambda: int(stdin.readline())
arr_in = lambda: [int(x) for x in stdin.readline().split()]
mat_in = lambda rows: [arr_in() for _ in range(rows)]
str_in = lambda: stdin.readline().strip()
out = lambda o: stdout.write("{}\n".format(o))
arr_out = lambda o: out(" ".join(map(str, o)))
bool_out = lambda o: out("YES" if o else "NO")
tests = lambda: range(1, int_in() + 1)
case_out = lambda i, o: out("Case #{}: {}".format(i, o))


if __name__ == "__main__":
    n = int_in()
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for _ in range(n):
        s = str_in()
        if "AC" == s:
            ac += 1
        elif "WA" == s:
            wa += 1
        elif "TLE" == s:
            tle += 1
        elif "RE" == s:
            re += 1
    out("AC x {}".format(ac))
    out("WA x {}".format(wa))
    out("TLE x {}".format(tle))
    out("RE x {}".format(re))

Submission status: Accepted

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

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

for i in range(n):
  s = input()
  dic[s] += 1
  
print('AC x ' + str(dic['AC']))
print('WA x ' + str(dic['WA']))
print('TLE x ' + str(dic['TLE']))
print('RE x ' + str(dic['RE']))

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
N = I()
sl = [S() for _ in range(N)]
#AC = WA = TLE = RE = 0
print('AC x '+ str(sl.count('AC')))
print('WA x '+ str(sl.count('WA')))
print('TLE x '+ str(sl.count('TLE')))
print('RE x '+ str(sl.count('RE')))

Submission status: Accepted

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

print("AC x ",ans[0])
print("WA x ",ans[1])
print("TLE x ",ans[2])
print("RE x ",ans[3])

Submission status: Accepted

Solution code:
#import numpy as np
#import math
#from decimal import *
#from numba import njit

#@njit
def main():
    N = int(input())
    AC, WA, TLE, RE = 0,0,0,0
    for _ in range(N):
        i = input()
        if i == 'AC':
            AC += 1
        elif i == 'WA':
            WA += 1
        elif i == 'TLE':
            TLE += 1
        elif i == 'RE':
            RE += 1
    
    print('AC x ' + str(AC))
    print('WA x ' + str(WA))
    print('TLE x ' + str(TLE))
    print('RE x ' + str(RE))

main()

Submission status: Accepted

Solution code:
n=int(input())
c0=0
c1=0
c2=0
c3=0
for i in range(n):
  s=input()
  if s=='AC':
    c0+=1
  elif s=='WA':
    c1+=1
  elif s=='TLE':
    c2+=1
  else:
    c3+=1
print("AC x",c0)
print("WA x",c1)
print("TLE x",c2)
print("RE x",c3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A= int(input())
l=[]
for i in range(A):
   l.append(input())
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:
import sys
readline = sys.stdin.buffer.readline
read = sys.stdin.buffer.read


from collections import Counter


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

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

Submission status: Accepted

Solution code:


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

def main():
    mod=10**9+7
    N=I()
    from collections import defaultdict
    dd = defaultdict(int)
    for i in range(N):
        S=input()
        dd[S]+=1
        
    print("AC x",dd["AC"])
    print("WA x",dd["WA"])
    print("TLE x",dd["TLE"])
    print("RE x",dd["RE"])

main()

Submission status: Accepted

Solution code:
n=int(input())
l=[]
for i in range(n):
    l.append(input())
    
a=l.count('AC')
b=l.count('WA')
c=l.count('TLE')
d=l.count('RE')

print('AC x',a)
print('WA x',b)
print('TLE x',c)
print('RE x',d)

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
def resolve():
    n = int(input())
    ac = 0
    wa = 0
    tle = 0
    re = 0
    for _ 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))

resolve()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())


ac=0
wc=0
tc=0
rc=0

for i in range(N):
    s=input()

    if "AC"==s:
        ac+=1
    elif "WA"==s:
        wc+=1
    elif "TLE"==s:
        tc+=1
    elif "RE"==s:
        rc+=1

print("AC x "+str(ac))
print("WA x "+str(wc))
print("TLE x "+str(tc))
print("RE x "+str(rc))

Submission status: Accepted

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

for l in ["AC", "WA", "TLE", "RE"]:
    print(f"{l} x {result[l]}")

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 " + 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 = dict()
for _ in range(N):
    s = input()
    S[s] = S.get(s, 0) + 1
for k in ['AC', 'WA', 'TLE', 'RE']:
    print(f'{k} x {S.get(k, 0)}')

Submission status: Accepted

Solution code:
n = int(input())
ac = 0
re = 0
tle = 0
wa = 0
for i in range(n):
    t = input()
    if t[0]=="A":
        ac+=1
    if t[0] == "T":
        tle +=1
    if t[0] == "W":
        wa += 1
    if t[0] == "R":
        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/python3
# -*- coding: utf-8 -*-
from queue import Queue
from queue import LifoQueue as Stack
from math import sqrt, floor, ceil, log2, log10, pi
from fractions import gcd
from itertools import permutations, combinations
from operator import itemgetter
from functools import cmp_to_key


INF=1001001001
__MOD__=(10**9)+7
yn = 'YNeos'
judge = False
cnt = 0
ans = None


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

def intinput():
    return int(input())

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

def lineinputs(func=intinput):
    datas = []
    while True:
        try:
            datas.append(func())
        except EOFError:
            break
    return datas

class ModInt():
    def __init__(self, x):
        self.__x = (x % __MOD__)
    def __add__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x + other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x + other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __radd__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x + self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x + self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __sub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x - other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x - other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rsub__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x - self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x - self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __mul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rmul__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__x)%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__x)%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __truediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((self.__x * other.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((self.__x * other.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")
    def __rtruediv__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__((other.__x * self.__modinv())%__MOD__))
        elif type(other) == ModInt:
            return self.__class__((other.__x * self.__modinv())%__MOD__)
        else:
            raise Exception("Not Int or Not ModInt")

    def __pow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(self.__x, other.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(self.__x, other.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")
    def __rpow__(self, other):
        if type(other) == int:
            other = self.__class__(other)
            return int(self.__class__(pow(other.__x, self.__x, __MOD__)))
        elif type(other) == ModInt:
            return self.__class__(pow(other.__x, self.__x, __MOD__))
        else:
            raise Exception("Not Int or Not ModInt")

    def __modinv(self, m=__MOD__):
        a = self.__x
        if a == 0:
            raise ZeroDivisionError()
        if gcd(a, m) != 1:
            raise Exception("%sの逆数は求まりません。" % a)
        b, u, v = m, 1, 0
        while b != 0:
            t = a//b;
            a -= t*b
            a, b = b, a
            u -= t * v
            u, v = v, u
        u %= m
        if u < 0:
            u += m
        return u
    def __int__(self):
        return self.__x
    def __str__(self):
        return str(self.__x)



if __name__ == '__main__':
    N = intinput()
    ss = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    for _ in range(N):
        s = input()
        ss[s] += 1

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

Submission status: Accepted

Solution code:
### ----------------
### ここから
### ----------------

import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline
    ans={}
    ans["AC"]=0
    ans["WA"]=0
    ans["TLE"]=0
    ans["RE"]=0
    #n,m,k=map(int, readline().rstrip().split())
    #arr=list(map(int, readline().rstrip().split()))
    n=int(readline())
    for i in range(n):
        s=readline().rstrip()
        ans[s]+=1
    print("AC x ",end="")
    print(ans["AC"])
    print("WA x ",end="")
    print(ans["WA"])
    print("TLE x ",end="")
    print(ans["TLE"])
    print("RE x ",end="")
    print(ans["RE"])
    #yn(1)

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

### ----------------
### ここまで 
### ----------------

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
INF = 10**9
mod = 10**9+7

N = i()
S = [s() for _ in range(N)]
ac = S.count('AC')
wa = S.count('WA')
tle = S.count('TLE')
re = S.count('RE')
print('AC x '+str(ac))
print('WA x '+str(wa))
print('TLE x '+str(tle))
print('RE x '+str(re))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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



    

    
resolve()

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 k, v in dic.items():
	print("%s x %s" % (k, v))

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
S = Counter(S)
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:
# -*- coding: utf-8 -*-
N = int(input())
S = []
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 "+str(AC))
print("WA x "+str(WA))
print("TLE x "+str(TLE))
print("RE x "+str(RE))

Submission status: Accepted

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

for _ 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:
#: Author - Soumya Saurav
import sys,io,os,time
from collections import defaultdict
from collections import OrderedDict
from collections import deque
from itertools import combinations
from itertools import permutations
import bisect,math,heapq
alphabet = "abcdefghijklmnopqrstuvwxyz"

#input = sys.stdin.readline

########################################
count = defaultdict(int)
count = {"AC" : 0 , "WA" : 0, "TLE" : 0, "RE" : 0}
for ii in range(int(input())):
	
	s = input()
	count[s]+=1
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:
#!/usr/bin/env python3

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

nac = nwa = ntle = nre = 0 
for i in range(n):
    if s[i] == 'AC':
        nac += 1
    if s[i] == 'WA':
        nwa += 1
    if s[i] == 'TLE':
        ntle += 1
    if s[i] == 'RE':
        nre += 1

print('AC x {}'.format(nac))
print('WA x {}'.format(nwa))
print('TLE x {}'.format(ntle))
print('RE x {}'.format(nre))

Submission status: Accepted

Solution code:
from collections import Counter

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


c = Counter(s)

for _type in ["AC", "WA", "TLE", "RE"]:
    print(f"{_type} x {c[_type]}")

Submission status: Accepted

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


def solve(N: int, S: "List[str]"):
    for res in ['AC', 'WA', 'TLE', 'RE']:
        print(f"{res} x {S.count(res)}")
    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 = [input() for i in range(n)]
from collections import Counter
b = Counter(s)
print('AC x '+str(b['AC']))
print('WA x '+str(b['WA']))
print('TLE x '+str(b['TLE']))
print('RE x '+str(b['RE']))

Submission status: Accepted

Solution code:
N = int(input())

A = 0
W = 0
T = 0
R = 0
for i in range(N):
    word = input()
    if ("AC" == word):
        A += 1
    elif ("WA" == word):
        W += 1
    elif ("TLE" == word):
        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
from collections import Counter

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
words = read().rstrip().decode().split()

counter = Counter(words)
for x in ['AC', 'WA', 'TLE', 'RE']:
    n = counter[x]
    print('{} x {}'.format(x, n))

Submission status: Accepted

Solution code:
N = int(input())

res = {"AC": 0 ,"WA": 0, "TLE": 0, "RE": 0}
keys = ["AC", "WA", "TLE", "RE"]

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

for key in keys:
  print(key, "x", int(res[key]))

Submission status: Accepted

Solution code:
N = int(input())

ans = dict()
ans["AC"] = 0
ans["WA"] = 0
ans["TLE"] = 0
ans["RE"] = 0
for i in range(N):
    s = input()
    ans[s] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
s = []
for i 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())
ac=0
tle=0
wa=0
re=0
for _ in range(n):
    s=input()
    if s=='AC':
        ac+=1
    elif s=='WA':
        wa+=1
    elif s=='TLE':
        tle+=1
    else:
        re+=1
print('AC x {}'.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())

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

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

Submission status: Accepted

Solution code:
from collections import Counter
N = int(input())
S = [input() for _ in range(N)]
c = Counter(S)
for a in ["AC", "WA", "TLE", "RE"]:
    print(a, "x", c[a])

Submission status: Accepted

Solution code:
AC = 0
WA = 0
TLE = 0
RE = 0
 
N = int(input())
for i in range(N):
  l = input()
  if l == "AC":
    AC += 1
  elif l == "WA":
    WA += 1
  elif l == "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:
"""
    こんにちは。これはクシャルです
    
    Author : thekushalghosh (クシャル)
    Team   : CodeDiggers
 
    I prefer Python language over the C++ language :p :D
        
    Visit my website : thekushalghosh.github.io
"""
import sys,math,cmath,time,heapq
start_time = time.time()
##########################################################################
################# ---- THE ACTUAL CODE STARTS BELOW ---- #################

def solve():
    n = inp()
    q,w,qq,ww = 0,0,0,0
    for i in range(n):
        s = insr()
        if s == "AC":
            q = q + 1
        elif s == "WA":
            w = w + 1
        elif s == "TLE":
            qq = qq + 1
        else:
            ww = ww + 1
    print("AC x",q)
    print("WA x",w)
    print("TLE x",qq)
    print("RE x",ww)
    
################## ---- THE ACTUAL CODE ENDS ABOVE ---- ##################
##########################################################################
 
def main():
    global tt
    if not ONLINE_JUDGE:
        sys.stdin = open("input.txt","r")
        sys.stdout = open("output.txt","w")
    t = 1
    for tt in range(t):
        solve()
    if not ONLINE_JUDGE:
        print("Time Elapsed :",time.time() - start_time,"seconds")
        sys.stdout.close()
    
#---------------------- USER DEFINED INPUT FUNCTIONS ----------------------#
def inp():
    return(int(input()))
def inlt():
    return(list(map(int,input().split())))
def insr():
    return(input().strip())
def invr():
    return(map(int,input().split()))
 
#------------------ USER DEFINED PROGRAMMING FUNCTIONS ------------------#
def counter(a):
    q = [0] * max(a)
    for i in range(len(a)):
        q[a[i] - 1] = q[a[i] - 1] + 1
    return(q)

def counter_elements(a):
    q = dict()
    for i in range(len(a)):
        if a[i] not in q:
            q[a[i]] = 0
        q[a[i]] = q[a[i]] + 1
    return(q)

def string_counter(a):
    q = [0] * 26
    for i in range(len(a)):
        q[ord(a[i]) - 97] = q[ord(a[i]) - 97],1
    return(q)
 
def factors(n):
    q = []
    for i in range(1,int(n ** 0.5) + 1):
        if n % i == 0: q.append(i); q.append(n // i)
    return(list(sorted(list(set(q)))))
 
def prime_factors(n):
    q = []
    while n % 2 == 0: q.append(2); n = n // 2
    for i in range(3,int(n ** 0.5) + 1,2):
        while n % i == 0: q.append(i); n = n // i
    if n > 2: q.append(n)
    return(list(sorted(q)))

def transpose(a):
    b = [[0] * len(a) for i in range(len(a))]
    for i in range(len(a)): 
        for j in range(len(a)): 
            b[i][j] = a[j][i]
    return(b)

#-----------------------------------------------------------------------#
        
ONLINE_JUDGE = __debug__
if ONLINE_JUDGE:
    input = sys.stdin.readline
    
    
main()

Submission status: Accepted

Solution code:
import sys
import math
import heapq
from collections import defaultdict, deque
from decimal import *
def r():
    return int(input())
def rm():
    return map(int,input().split())
def rl():
    return list(map(int,input().split()))

ac=0;wa=0;tle=0;re=0
for _ in range(r()):
    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())

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

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

print('AC x '+str(c0))
print('WA x '+str(c1))
print('TLE x '+str(c2))
print('RE x '+str(c3))

Submission status: Accepted

Solution code:
N = int(input())

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

for i in range(N):
    S = input()
    if S == "AC":
        AC += 1
    elif S == "WA":
        WA += 1
    elif S == "TLE":
        TLE += 1
    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:
from collections import Counter
n = int(input())
S = [input() for _ in range(n)]

C = Counter(S)

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:
import sys
import math
import bisect

def main():
    d = dict()
    for _ in range(int(input())):
        s = input()
        if s not in d:
            d[s] = 0
        d[s] += 1
    A = ['AC', 'WA', 'TLE', 'RE']
    for a in A:
        if a not in d:
            d[a] = 0
        print('%s x %d' % (a, d[a]))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    n = int(input())
    ans = {}
    ans["AC"] = 0
    ans["WA"] = 0
    ans["TLE"] = 0
    ans["RE"] = 0

    for i in range(n):
        s = input()
        ans[s]+=1
    print("AC x " + str(ans["AC"]))
    print("WA x "+str(ans["WA"]))
    print("TLE x "+str(ans["TLE"]))
    print("RE x "+str(ans["RE"]))

Submission status: Accepted

Solution code:
import sys
#import string
from collections import defaultdict, deque, Counter
#import bisect
#import heapq
#import math
#from itertools import accumulate
#from itertools import permutations as perm
#from itertools import combinations as comb
#from itertools import combinations_with_replacement as combr
#from fractions import gcd
#import numpy as np

stdin = sys.stdin
sys.setrecursionlimit(10 ** 7)
MIN = -10 ** 9
MOD = 10 ** 9 + 7
INF = float("inf")
IINF = 10 ** 18

def solve():
    n = int(stdin.readline().rstrip())
    #A, B, C = map(int, stdin.readline().rstrip().split())
    #l = list(map(int, stdin.readline().rstrip().split()))
    #numbers = [[int(c) for c in l.strip().split()] for l in sys.stdin]
    word = [stdin.readline().rstrip() for _ in range(n)]
    #number = [[int(c) for c in stdin.readline().rstrip()] for _ in range(n)]
    #zeros = [[0] * w for i in range(h)]
    c = Counter(word)
    ac = c["AC"]
    wa = c["WA"]
    tle = c["TLE"]
    re = c["RE"]
    print("AC x "+str(ac))
    print("WA x "+str(wa))
    print("TLE x "+str(tle))
    print("RE x "+str(re))


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
from collections import defaultdict

def t():
    return 0

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

for i in range(int(input())):
    d[input()] += 1
# print(d)

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())
a = 0
w = 0
t = 0
r = 0
for i in range(N):
    S = input()
    if S == 'AC':
        a += 1
    if S == 'WA':
        w += 1
    if S == 'TLE':
        t += 1
    if S == 'RE':
        r += 1
print('AC x ' + str(a))
print('WA x ' + str(w))
print('TLE x ' + str(t))
print('RE x ' + str(r))

Submission status: Accepted

Solution code:
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())
A = 0
W = 0
T = 0
R = 0
for i in range(n):
  i = input()
  if i[0] == 'A':
    A += 1
  elif i[0] == 'W':
    W += 1
  elif i[0] == 'T':
    T += 1
  elif i[0] == 'R':
    R += 1
print('AC x {}'.format(A))
print('WA x {}'.format(W))
print('TLE x {}'.format(T))
print('RE x {}'.format(R))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter

N = int(input())

S = []
for _ in range(N):
    S.append(input())
dic = Counter(S)

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