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())

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

for _ in range(n):
    s = input()

    if s == 'AC':
        AC += 1
    elif s == 'WA':
        WA += 1
    elif s == 'TLE':
        TLE += 1
    else:
        RE += 1

print(f'AC x {AC}')
print(f'WA x {WA}')
print(f'TLE x {TLE}')
print(f'RE x {RE}')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import Counter


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

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

    cnt = Counter(S)

    for value in aar:
        if value in cnt.keys():
            print(value, cnt[value], sep=" x ")
        else:
            print(value, 0, sep=" x ")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
c = [0] * 4
str = ['AC', 'WA', 'TLE', 'RE']
for _ in range(n):
    s = input()
    if s in str:
        i = str.index(s)
        c[i] += 1
for s, ct in zip(str, c):
    print('{} x {}'.format(s, ct))

Submission status: Accepted

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

for k in ['AC', 'WA', 'TLE', 'RE']:
  print(f'{k} x {hist[k]}', flush=True)

Submission status: Accepted

Solution code:
N=int(input())
cnt=0
S=[]
while cnt < N:
    S.append(input())
    cnt += 1
print(f'AC x {S.count("AC")}')
print(f'WA x {S.count("WA")}')
print(f'TLE x {S.count("TLE")}')
print(f'RE x {S.count("RE")}')

Submission status: Accepted

Solution code:
a = int(input())
b = [input() for i in range(a)]
c = ["AC", "WA", "TLE", "RE"]
for d in c:
  print(f"{d} x {b.count(d)}")

Submission status: Accepted

Solution code:
ac = 0
wa = 0
tle = 0
re = 0

n = int(input())

for _ in range(n):
    result = input()
    if(result == "AC"):
        ac += 1
    if(result == "WA"):
        wa += 1
    if(result == "TLE"):
        tle += 1
    if(result == "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:
l=[0]*4
for i in range(int(input())):
  s=input()
  if s=='AC':
    l[0]+=1
  elif s=='WA':
    l[1]+=1
  elif s=='RE':
    l[3]+=1
  else:
    l[2]+=1
print(f'AC x {l[0]}',f'WA x {l[1]}',f'TLE x {l[2]}',f'RE x {l[3]}')

Submission status: Accepted

Solution code:
from collections import defaultdict as dd
from collections import deque
import bisect
import heapq

def ri():
    return int(input())

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


def solve():
    n = ri()
    d = dd(int)
    for i in range(n):
        d[input()] += 1

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






mode = 's'

if mode == 'T':
    t = ri()
    for i in range(t):
        solve()
else:
    solve()

Submission status: Accepted

Solution code:
n = int(input());
ac=wa=tle=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())
s = {"AC": 0, "WA": 0, "TLE": 0, "RE": 0}
for i in range(n):
    s[input()] += 1

for k, v in s.items():
    print(f"{k} x {v}")

Submission status: Accepted

Solution code:
#
#    ------------------------------------------------
#           ____          _     Generatered using
#          / ___|        | |
#         | |    __ _  __| | ___ _ __  ______ _
#         | |   / _` |/ _` |/ _ \ '_ \|_  / _` |
#         | |__| (_| | (_| |  __/ | | |/ / (_| |
#          \____\____|\____|\___|_| |_/___\____|
#
#      GNU Affero General Public License v3.0
#    ------------------------------------------------
#    Author   : prophet
#    Created  : 2020-07-05 22:32:00.862335
#    UUID     : 7dkLQccO4q5xeCWr
#    ------------------------------------------------
#
production = True

import sys, math, collections

def input(input_format = 0, multi = 0):

    if multi > 0: return [input(input_format) for i in range(multi)]
    else:
        next_line = sys.stdin.readline()[:-1]

        if input_format >= 10:
            use_list = False
            input_format = int(str(input_format)[-1])
        else: use_list = True

        if input_format == 0: formatted_input = [next_line]
        elif input_format == 1: formatted_input = list(map(int, next_line.split()))
        elif input_format == 2: formatted_input = list(map(float, next_line.split()))
        elif input_format == 3: formatted_input = list(next_line)
        elif input_format == 4: formatted_input = list(map(int, list(next_line)))
        elif input_format == 5: formatted_input = next_line.split()
        else: formatted_input = [next_line]

        return formatted_input if use_list else formatted_input[0]

def out(output_line, output_format = 0, newline = True):

    formatted_output = ""

    if output_format == 0: formatted_output = str(output_line)
    elif output_format == 1: formatted_output = " ".join(map(str, output_line))
    elif output_format == 2: formatted_output = "\n".join(map(str, output_line))

    print(formatted_output, end = "\n" if newline else "")

def log(*args):
    if not production:
        print("$$$", end = "")
        print(*args)

enu = enumerate

ter = lambda a, b, c: b if a else c

def mapl(iterable, format = 0):
    
    if format == 0: return list(map(int, iterable))
    elif format == 1: return list(map(str, iterable))
    elif format == 2: return list(map(list, iterable))
#
#   >>>>>>>>>>>>>>> START OF SOLUTION <<<<<<<<<<<<<<
#


def solve():

    n = input(11)
    g = input(0, n)

    a = t = w = r = 0

    for i in g:
        i = i[0]
        if i == "AC":
            a += 1
        elif i == "TLE":
            t += 1
        elif i == "WA":
            w += 1
        elif i == "RE":
            r += 1

    out(f"AC x {a}")
    out(f"WA x {w}")
    out(f"TLE x {t}")
    out(f"RE x {r}")

    return


#for i in range(input(11)): solve()
solve()

#
#   >>>>>>>>>>>>>>>> END OF SOLUTION <<<<<<<<<<<<<<<
#

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

lists = [0]*4
for i in range(N):
  s = input()
  if "AC"==s:
    lists[0] += 1
  elif "WA"==s:
    lists[1] += 1
  elif "TLE"==s:
    lists[2] += 1
  else:
    lists[3] += 1

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

Submission status: Accepted

Solution code:
n = int(input())
l = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
for _ in range(n):
  b = input()
  l[b] += 1
for k in l.keys():
  print(str(k)+' x '+str(l[k]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter 
N = int(input())
words = []
for i in range(N):
    S = input()
    words.append(S)
cnt = Counter(words)
for x in ['AC', 'WA', 'TLE', 'RE']:
    n = cnt[x]
    print('{} x {}'.format(x, n))

Submission status: Accepted

Solution code:
n = int(input())
dicts = {}
for i in range(n):
    tempstr = input()
    if tempstr not in dicts:
        dicts[tempstr] = 1 
    else:
        dicts[tempstr] += 1 
if "AC" not in dicts:
    dicts["AC"] = 0 
if "WA" not in dicts:
    dicts["WA"] = 0 
if "TLE" not in dicts:
    dicts["TLE"] = 0 
if "RE" not in dicts:
    dicts["RE"] = 0 
print("AC x " + str(dicts["AC"]))
print("WA x " + str(dicts["WA"]))
print("TLE x " + str(dicts["TLE"]))
print("RE x " + str(dicts["RE"]))

Submission status: Accepted

Solution code:
N=int(input())
S = []
for _ in range(N):
    S.append(input())
a=0
b=0
c=0
d=0
for i in S:
  if i=='AC':
    a+=1
  elif i=='WA':
    b+=1
  elif i=='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:
from collections import Counter

counter = Counter()
n = int(input())

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

for item in ["AC", "WA", "TLE", "RE"]:
  print("{0} x {1}".format(item, counter[item]))

Submission status: Accepted

Solution code:
from collections import Counter as C
n = int(input())
l = [input() for _ in range(n)]
c = C(l)
for k in ['AC', 'WA', 'TLE', 'RE']:
  if k not in c:
    print('{} x 0'.format(k))
  else:
    print('{} x {}'.format(k, c[k]))

Submission status: Accepted

Solution code:
import collections
N = int(input())
S=[]
for i in range(N):
    S.append(input())
c = collections.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:
def B():
    N = int(input())
    count = {'AC':0, 'WA':0, 'TLE':0, 'RE':0}
    for _ in range(N):
        count[input()] += 1
    for k in count:
        print(k, 'x', count[k])
B()

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
c0 = c1 = c2 = c3 = 0

N = int(input())
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
tmp = ['AC', 'WA', 'TLE', 'RE']
tmp2 = [c0, c1, c2, c3]        

for i in range(4):
    print(tmp[i] + ' ' + 'x' + ' ' + str(tmp2[i]))

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):
  s = input().strip()
  dic[s] += 1
print("AC x ",end = '')
print(dic['AC'])
print("WA x ",end = '')
print(dic['WA'])
print("TLE x ",end = '')
print(dic['TLE'])
print("RE x ",end = '')
print(dic['RE'])

Submission status: Accepted

Solution code:
#abc173b
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())

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

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

for k,v in ans.items():
    print(k, ' x ',v)

Submission status: Accepted

Solution code:
import collections

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

counter = collections.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())
C0 = 0
C1 = 0
C2 = 0
C3 = 0


for i in range(N):
    C = input()
#    print(C)
    if C == 'AC':
        C0 += 1
    elif C == 'WA':
        C1 += 1
    elif C == 'TLE':
        C2 += 1
    elif C == 'RE':
        C3 += 1

print('AC x ' + str(C0))
print('WA x ' + str(C1))
print('TLE x ' + str(C2))
print('RE x ' + str(C3))

Submission status: Accepted

Solution code:
from collections import Counter as ct

n = int(input())
s = ct([input() for _ in range(n)])
print("AC x " + str(s["AC"]))
print("WA x " + str(s["WA"]))
print("TLE x " + str(s["TLE"]))
print("RE x " + str(s["RE"]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
n = int(input())

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter

n = int(input())
cnt = Counter([input() for _ in range(n)])
  
for x in ['AC', 'WA', 'TLE', 'RE']:
  print("{} x {}".format(x, cnt[x]))

Submission status: Accepted

Solution code:
n = int(input())
d = {}

for _ in range(n):
  a = input()
  d[a] = d.get(a, 0) + 1
  
for x in ['AC', 'WA', 'TLE', 'RE']:
  print(x + ' x ' + str(d.get(x, 0)))

Submission status: Accepted

Solution code:
from collections import defaultdict
n = int(input())
cnt = defaultdict(int)
for _ in range(n):
    s = input()
    cnt[s] += 1

labels = ['AC', 'WA', 'TLE', 'RE']
for label in labels:
    print(label, 'x', cnt[label])

Submission status: Accepted

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


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


def str_array():
    return input().strip().split()


def lower_letters():
    lowercase = [chr(i) for i in range(97, 97+26)]
    return lowercase

def how_frequent(lis):
	last = None
	count = []
	each = 1
	for i in range(len(lis)):
		if last != None:
			last = lis[i-1]
		if last == lis[i]:
			each += 1
		else:
			count.append(each)
			each = 0
		last = lis[i]
	return max(count)


def upper_letters():
    uppercase = [chr(i) for i in range(65, 65+26)]
    return uppercase

######################### TEMPLATE ENDS HERE ##################################


n = int(input())
ac,tle,re,wa= 0,0,0,0
for i in range(n):
	s = input().strip()
	if s == "AC":
		ac+=1
	elif s == "TLE":
		tle +=1
	elif s == "RE":
		re+=1
	else:
		wa+=1

print(f"AC x {ac}\nWA x {wa}\nTLE x {tle}\nRE x {re}\n")

Submission status: Accepted

Solution code:
## necessary imports
import sys
input = sys.stdin.readline
# from math import ceil, floor, factorial;

def ceil(x):
    if x != int(x):
        x = int(x) + 1;
    return x;
    
# swap_array function
def swaparr(arr, a,b):
    temp = arr[a];
    arr[a] = arr[b];
    arr[b] = temp

## gcd function
def gcd(a,b):
    if b == 0:
        return a
    return gcd(b, a % b);

## nCr function efficient using Binomial Cofficient
def nCr(n, k): 
    if(k > n - k): 
        k = n - k 
    res = 1
    for i in range(k): 
        res = res * (n - i) 
        res = res / (i + 1) 
    return int(res) 

## upper bound function code -- such that e in a[:i] e < x;
def upper_bound(a, x, lo=0, hi = None):
    if hi == None:
        hi = len(a);
    while lo < hi:
        mid = (lo+hi)//2
        if a[mid] < x:
            lo = mid+1
        else:
            hi = mid
    return lo

## prime factorization
def primefs(n):
    ## if n == 1    ## calculating primes
    primes = {}
    while(n%2 == 0 and n > 0):
        primes[2] = primes.get(2, 0) + 1
        n = n//2
    for i in range(3, int(n**0.5)+2, 2):
        while(n%i == 0 and n > 0):
            primes[i] = primes.get(i, 0) + 1
            n = n//i
    if n > 2:
        primes[n] = primes.get(n, 0) + 1
    ## prime factoriazation of n is stored in dictionary
    ## primes and can be accesed. O(sqrt n)
    return primes

## MODULAR EXPONENTIATION FUNCTION
def power(x, y, p): 
    res = 1
    x = x % p  
    if (x == 0) : 
        return 0
    while (y > 0) : 
        if ((y & 1) == 1) : 
            res = (res * x) % p 
        y = y >> 1      
        x = (x * x) % p 
    return res 

## DISJOINT SET UNINON FUNCTIONS
def swap(a,b):
    temp = a
    a = b
    b = temp
    return a,b

# find function with path compression included (recursive)
# def find(x, link):
#     if link[x] == x:
#         return x
#     link[x] = find(link[x], link);
#     return link[x];

# find function with path compression (ITERATIVE)
def find(x, link):
    p = x;
    while( p != link[p]):
        p = link[p];
    
    while( x != p):
        nex = link[x];
        link[x] = p;
        x = nex;
    return p;


# the union function which makes union(x,y)
# of two nodes x and y
def union(x, y, link, size):
    x = find(x, link)
    y = find(y, link)
    if size[x] < size[y]:
        x,y = swap(x,y)
    if x != y:
        size[x] += size[y]
        link[y] = x

## returns an array of boolean if primes or not USING SIEVE OF ERATOSTHANES
def sieve(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n): 
        if (prime[p] == True): 
            for i in range(p * p, n+1, p):
                prime[i] = False
        p += 1
    return prime

#### PRIME FACTORIZATION IN O(log n) using Sieve ####
MAXN = int(1e5 + 5)
def spf_sieve():
    spf[1] = 1;
    for i in range(2, MAXN):
        spf[i] = i;
    for i in range(4, MAXN, 2):
        spf[i] = 2;
    for i in range(3, ceil(MAXN ** 0.5), 2):
        if spf[i] == i:
            for j in range(i*i, MAXN, i):
                if spf[j] == j:
                    spf[j] = i;
    ## function for storing smallest prime factors (spf) in the array

################## un-comment below 2 lines when using factorization #################
# spf = [0 for i in range(MAXN)]
# spf_sieve();
def factoriazation(x):
    ret = {};
    while x != 1:
        ret[spf[x]] = ret.get(spf[x], 0) + 1;
        x = x//spf[x]
    return ret
    ## this function is useful for multiple queries only, o/w use
    ## primefs function above. complexity O(log n)

## taking integer array input
def int_array():
    return list(map(int, input().strip().split()))
## taking string array input
def str_array():
    return input().strip().split();

#defining a couple constants
MOD = int(1e9)+7;
CMOD = 998244353;
INF = float('inf'); NINF = -float('inf');

################### ---------------- TEMPLATE ENDS HERE ---------------- ###################

n = int(input()); 
dick = {'AC' : 0, 'WA' : 0, 'TLE' : 0, 'RE' : 0};
for _ in range(n):
    dick[input().strip()] += 1;
for i in dick:
    print(i,' x ',dick[i]);

Submission status: Accepted

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

for x in range(n):
    s = input()
    if s == "AC":
        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:
ac = wa = tle = re = 0

for i in range(int(input())):
    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:
import sys 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(readline())
S = read().decode().rstrip().split()
for s in ['AC','WA','TLE','RE']:
    print("{0} x {1}".format(s,S.count(s)))

Submission status: Accepted

Solution code:
c=open(0).read().count
for s in'AC','WA','TLE','RE':print(s,'x',c(s))

Submission status: Accepted

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

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

for s1 in s:
  if s1 == 'AC':
    judge['AC']+=1
  elif s1 == 'WA':
    judge['WA']+=1
  elif s1 == 'TLE':
    judge['TLE']+=1
  else:
    judge['RE']+=1
print("AC x "f"{judge['AC']}")
print("WA x "f"{judge['WA']}")
print("TLE x "f"{judge['TLE']}")
print("RE x "f"{judge['RE']}")

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(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())
list1=[]
for i in range(N):
  list1.append(input())
a=list1.count("AC")
w=list1.count("WA")
t=list1.count("TLE")
r=list1.count("RE")
print(f'AC x {a}')
print(f'WA x {w}')
print(f'TLE x {t}')
print(f'RE x {r}')

Submission status: Accepted

Solution code:
import sys
import collections

sys.setrecursionlimit(10 ** 8)
ini = lambda: int(sys.stdin.readline())
inm = lambda: map(int, sys.stdin.readline().split())
inl = lambda: list(inm())
ins = lambda: sys.stdin.readline().rstrip()
debug = lambda *a, **kw: print("\033[33m", *a, "\033[0m", **dict(file=sys.stderr, **kw))

N = ini()
S = [ins() for _ in range(N)]


def solve():
    c = collections.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"]))


solve()

Submission status: Accepted

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

cnt1 = 0
cnt2 = 0
cnt3 = 0
cnt4 = 0

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

Submission status: Accepted

Solution code:
N = int(input())

ac = wa = tle = 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
	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())
h = {}

for i in range(n):
  verdict = input()
  if verdict == 'AC' or verdict == 'TLE' or verdict == 'RE' or verdict == 'WA':
    if verdict in h:
      h[verdict] += 1
    else:
      h[verdict] = 1

for k in ('AC', 'WA', 'TLE', 'RE'):
  if k in h:
    print("%s x %d" % (k, h[k]))
  else:
    print("%s x 0" % k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter


N = int(input())
S = [input() for _ in range(N)]
C = Counter(S)
for result in ['AC', 'WA', 'TLE', 'RE']:
    print(result + ' x ' + str(C[result]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from collections import Counter
_, *lst = open(0).read().split()
c = Counter(lst)
func = lambda x: str(c[x]) if x in c else '0'
print('AC x ' + func('AC'))
print('WA x ' + func('WA'))
print('TLE x ' + func('TLE'))
print('RE x ' + func('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
    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 = [input() for i in range(N)]

d = {"AC":0, "WA":0, "TLE":0, "RE":0}
for s in S:
    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:
# B - Judge Status Summary
from collections import Counter


def main():
    _, *S = open(0).read().split()
    cnt = Counter(S)
    for status in ["AC", "WA", "TLE", "RE"]:
        print(f"{status} x {cnt[status]}")


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
n=int(input())
ac=int(0)
wa=int(0)
tle=int(0)
re=int(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 {}".format(ac))
print("WA x {}".format(wa))
print("TLE x {}".format(tle))
print("RE x {}".format(re))

Submission status: Accepted

Solution code:
from collections import defaultdict

N = int(input())

count = defaultdict(int)
for i in range(N):
  s = input()
  count[s] += 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:
import sys,math,collections
from collections import defaultdict
import math,sys
#from itertools import permutations,combinations

def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w') 
	

def get_array():
	l=list(map(int, input().split()))
	return l
def sod(n):
	n,c=str(n),0
	for i in n:	
		c+=int(i)
	return c	
#file()	
def main():
	#a,b=map(int, input().split())
	l=[]

	for _ in range(int(input())):
		s=input()
		l.append(s)
	#print(l)	
	c=collections.Counter(l)
	print('AC','x',c['AC'])
	print('WA','x',c['WA'])
	print('TLE','x',c['TLE'])
	print('RE','x',c['RE'])
	'''n,x=map(int, input().split())
		l=list(map(int, input().split()))
		l.sort()
		for i in range(len(l)):
			if(2*l[i]>x):
				ind=i
				break
		
		l=l[ind:]+l[:ind]
		print(l)
		cures=len(l)
		i,ans=0,0
		print('h')
		while(cures>0):
			print("nz")
			if(x>=l[i]):
				cures-=1
				x=2*l[i]
				i+=1
			else:
				temp=l[i]
				l[i]=l[i]-x

				l[i]=min(2*l[i],temp)
			ans+=1
		print(ans)'''



		







		
		
		











		








if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#import 
#=input()
n=int(input())
#=map(int,input().split())
#=list(map(int,input().split()))
#=[list(map(int,input().split())) for _ in range()]
l = []
for i in range(n):
    l += [input()]
ac = l.count('AC')
wa = l.count('WA')
tle = l.count('TLE')
re = l.count('RE')
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())
lista=[]
ac= 0
wa=0
tle=0
re=0
for x in range(n):
    palavra= input()
    lista.append(palavra)
for x in range(n):
    if lista[x]== 'AC':
        ac+=1
    if lista[x]== 'WA':
        wa+=1
    if lista[x]== 'TLE':
        tle+=1
    if lista[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:
n=int(input())
s=[input() for _ in range(n)]
for t in ["AC","WA","TLE","RE"]:
	print(t, "x", s.count(t))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
input_one=int(input())
array=[]
a={"AC":0,"WA":0,"TLE":0,"RE":0}
for i in range(input_one):
    array.append(input())
for i in array:
    if i=="AC":
        a[i]+=1
    elif i=="WA":
        a[i]+=1
    elif i=="TLE":
        a[i]+=1
    elif i=="RE":
        a[i]+=1
    else:
        print()
print("AC x",a["AC"])
print("WA x",a["WA"])
print("TLE x",a["TLE"])
print("RE x",a["RE"])

Submission status: Accepted

Solution code:
n = int(input())
AC = 0
WA = 0
TLE = 0
RE = 0
for i in range(n):
  e = str(input())
  if e  == "AC":
    AC += 1
  elif e  == "WA":
    WA += 1
  elif e  == "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:
import sys
from collections import defaultdict as dd
from collections import deque
from fractions import Fraction as f
from copy import *
from bisect import *	
from heapq import *
from math import *
from itertools import permutations 
 
def eprint(*args):
    print(*args, file=sys.stderr)
zz=1
 
#sys.setrecursionlimit(10**6)
if zz:
	input=sys.stdin.readline
else:	
	sys.stdin=open('input.txt', 'r')
	sys.stdout=open('all.txt','w')
def li():
	return [int(x) for x in input().split()]
def fli():
	return [float(x) for x in input().split()]	
def gi():	
	return [x for x in input().split()]
def fi():
	return int(input())
def swap(a,i,j):
	a[i],a[j]=a[j],a[i]	
def si():
	return list(input().rstrip())	
def mi():
	return 	map(int,input().split())	
def gh():
	sys.stdout.flush()
def graph(n,m):
	for i in range(m):
		x,y=mi()
		a[x].append(y)
		a[y].append(x)
def bo(i):
	return ord(i)-ord('a')
		


tt=1


while tt>0:
	tt-=1
	n=fi()
	d={'AC':0,'WA':0,'TLE':0,'RE':0}
	for i in range(n):
		s=input().rstrip()
		d[s]+=1
	for i in d:
		print(i,"x",d[i])

Submission status: Accepted

Solution code:
arr = []
n = int(input())
while n > 0:
  arr.append(input())
  n -= 1
print('AC x', arr.count('AC'))
print('WA x', arr.count('WA'))
print('TLE x', arr.count('TLE'))
print('RE x', arr.count('RE'))