Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = input()
ans = N+1
for i in range(1, N):
    pre = S[0:i-1]
    back = S[i:N]
    #print(pre,back)
    #print(list(pre_and_back))
    ans = min(ans,(pre.count('W') + back.count('E')))

print(ans)

Fixed submission:
N = int(input())
S = input()
ans = N+1
W_cnt = S.count('W')
left_W_cnt = 0
right_W_cnt = W_cnt
E_cnt = S.count('E')
left_E_cnt = 0
right_E_cnt = E_cnt

for i in range(0, N):
    if S[i] == 'W':
        left_W_cnt += 1
        ans = min(ans,(left_W_cnt-1 + right_E_cnt))
    else:
        right_E_cnt -= 1
        ans = min(ans,(left_W_cnt + right_E_cnt))
    #print(left_W_cnt,right_E_cnt)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
S = input()
K = int(input())
S_len = len(S)
ans = set()
for i in range(0, S_len+1):
    for j in range(0, S_len):
        if j + i <= S_len:
            t = S[j:j + i]
            if t != '':
                ans.add(t)
ans = list(ans)
ans.sort()
print(ans[K-1])


Fixed submission:
S = input()
K = int(input())
S_len = len(S)
ans = set()
for i in range(0, K+1):
    for j in range(0, S_len):
        if j + i <= S_len:
            t = S[j:j + i]
            if t != '':
                ans.add(t)
ans = list(ans)
ans.sort()
print(ans[K-1])

Buggy python submission (verdict: Time Limit Exceeded):
S = input()
K = int(input())
target = []
def func(split_range):
    for i in range(0,len(S)-split_range+1):
        #print(S[0:0])
        #print(S[0:1])
        #print(S[i:i+split_range])
        #print(S[i:i+split_range])
        target.append(S[i:i+split_range])

for i in range(1,len(S)+1):
    #print(i)
    func(i)
#print(target)
print(sorted(set(target))[K-1])

Fixed submission:
S = input()
K = int(input())
S_len = len(S)
ans = set()
for i in range(0, K+1):
    for j in range(0, S_len):
        if j + i <= S_len:
            t = S[j:j + i]
            if t != '':
                ans.add(t)
ans = list(ans)
ans.sort()
print(ans[K-1])

Buggy python submission (verdict: Runtime Error):
S = input()
K = int(input())
target = []
def func(split_range):
    for i in range(0,len(S)-split_range+1):
        #print(S[0:0])
        #print(S[0:1])
        #print(S[i:i+split_range])
        #print(S[i:i+split_range])
        target.append(S[i:i+split_range])

for i in range(1,len(S)+1):
    #print(i)
    func(i)
#print(target)
print(sorted(set(target))[K-1]

Fixed submission:
S = input()
K = int(input())
S_len = len(S)
ans = set()
for i in range(0, K+1):
    for j in range(0, S_len):
        if j + i <= S_len:
            t = S[j:j + i]
            if t != '':
                ans.add(t)
ans = list(ans)
ans.sort()
print(ans[K-1])
Buggy python submission (verdict: Runtime Error):
N = input()
s1 = N[1:len(N)]
s2 = N[0:len(N) - 1]
isOk = True
for i in range(1, len(N-1)):
    if s1[i] != s1[i - 1]:
        break
        isOk = False
    else:
        continue

if isOk:
    print('Yes')

isOk = True
for i in range(1, len(N-1)):
    if s2[i] != s2[i - 1]:
        break
    else:
        continue

if isOk:
    print('Yes')
else:
    print('No')


Fixed submission:
N = input()
s1 = N[1:len(N)]
s2 = N[0:len(N) - 1]
isOk = True
for i in range(1, len(N)-1):
    if s1[i] != s1[i - 1]:
        isOk = False
        break
    else:
        continue

if isOk:
    print('Yes')
    exit(0)

isOk = True
for i in range(1, len(N)-1):
    if s2[i] != s2[i - 1]:
        isOk = False
        break
    else:
        continue

if isOk:
    print('Yes')
else:
    print('No')

Buggy python submission (verdict: Runtime Error):
N = input()
s1 = N[1:len(N)]
s2 = N[0:len(N) - 1]
isOk = True
for i in range(1, len(N)):
    if s1[i] != s1[i - 1]:
        break
        isOk = False
    else:
        continue

if isOk:
    print('Yes')

isOk = True
for i in range(1, len(N)):
    if s2[i] != s2[i - 1]:
        break
    else:
        continue

if isOk:
    print('Yes')
else:
    print('No')


Fixed submission:
N = input()
s1 = N[1:len(N)]
s2 = N[0:len(N) - 1]
isOk = True
for i in range(1, len(N)-1):
    if s1[i] != s1[i - 1]:
        isOk = False
        break
    else:
        continue

if isOk:
    print('Yes')
    exit(0)

isOk = True
for i in range(1, len(N)-1):
    if s2[i] != s2[i - 1]:
        isOk = False
        break
    else:
        continue

if isOk:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
N = int(input())
l_list = [2,1]
for i in range(2,N+1):
    a = l_list[i-1] + l_list[i-2]
    l_list.append(a)
print(l_list[i])




Fixed submission:
N = int(input())
l_list = [2,1]
for i in range(2,N+1):
    a = l_list[i-1] + l_list[i-2]
    l_list.append(a)
print(l_list[N])
Buggy python submission (verdict: Runtime Error):
N = int(input())
P = list(map(int, input().split()))
ans = 0
for i in range(N):
    if i == N-1:
        if P[i] == i+1:
            ans +=1
    a, b = P[i], P[i + 1]
    if a == i + 1:
        ans += 1
        P[i] = b
        P[i + 1] = a
print(ans)


Fixed submission:
N = int(input())
P = list(map(int, input().split()))
ans = 0
for i in range(N):
    if i == N-1:
        if P[i] == i+1:
            ans +=1
        break
    a, b = P[i], P[i + 1]
    if a == i + 1:
        ans += 1
        P[i] = b
        P[i + 1] = a
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
N = int(input())
ans = 0
for a in range(2,N - 1):
    for b in range(2,N - 1):
        if a * b < N:
            ans += 1
        elif a * b >= N:
            break
print(ans + ((N - 1) * 2 - 1))

Fixed submission:
import math
N = int(input())
ans = 0
for a in range(1,N):
    ans = ans + math.floor((N - 1)/a)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import *
N = int(input())
A = list(map(int,input().split()))
ans = 0
a = combinations(range(N),2)
for i in a:
    ans += A[i[0]] * A[i[1]]

print(ans % (10 ** 9 + 7))

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
s = [0]
for i in range(N):
    s.append(s[i] + A[i])
ans = 0
for i in range(N):
    ans += A[i] * (s[N] - s[i + 1])
print(ans % (10 ** 9 + 7))

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
ans = 0
for i in range(N - 1):
    for j in range(N - i - 1):
        ans += A[i] * A[i + j + 1]
print(ans % (pow(10,9) + 7))

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
s = [0]
for i in range(N):
    s.append(s[i] + A[i])
ans = 0
for i in range(N):
    ans += A[i] * (s[N] - s[i + 1])
print(ans % (10 ** 9 + 7))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
S = 1
for i in range(N):
    S *= A[i]
if S > 100 ** 9:
    print("-1")
else:
    print(S)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
S = 1
if 0 in A:
    print("0")
    exit()
    
for i in range(N):
    S *= A[i]
    if S > 1000000000000000000:
        print("-1")
        exit()

print(S)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int,input().split()))
S = 1
for i in range(N):
    S *= A[i]
if S > 10 ** 18:
    print("-1")
else:
    print(S)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
S = 1
if 0 in A:
    print("0")
    exit()
    
for i in range(N):
    S *= A[i]
    if S > 1000000000000000000:
        print("-1")
        exit()

print(S)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S = []
for i in range(N):
    tmp = input()
    if tmp not in S:
        S.append(tmp)

print(len(S))

Fixed submission:
N = int(input())
S = set()
for i in range(N):
    S.add(input())

print(len(S))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
for N in range(1, n+1):
    c = 0
    for i in range(1, n+1):
        for j in range(1, n+1):
            for k in range(1, n+1):
                if i**2 + j**2 + k**2 + i*j + j*k + k*i == N:
                    c += 1
    print(c)
                

Fixed submission:
n = int(input())
c = [0]*n
for x in range(1, 101):
    for y in range(1, 101):
        for z in range(1, 101):
            N = x**2 + y**2 + z**2 + x*y + y*z + z*x
            if n >= N:
                c[N-1] += 1
for i in c:
    print(i)
Buggy python submission (verdict: Runtime Error):
x, n = map(int, input().split())
p = list(map(int, input().split()))
t = [0]*101

for i in p:
    t[i] = 1

for j in range(50):
    if t[x-j] == 0:
        print(x-t[n-j])
        break
    elif t[x+j] == 0:
        print(x+t[n+j]+1)
        break


Fixed submission:
x, n = map(int, input().split())
p = list(map(int, input().split()))
if p == []:
    print(x)
    exit()
t = [0]*(max(p)+2)
for i in p:
    t[i] = 1

mi = t[:x+1]
ma = t[x:]
mi.reverse()
mii = mi.index(0)
maa = ma.index(0)

if mii < maa:
    print(x-mii)
elif mii > maa:
    print(x+maa)
elif mii == maa:
    print(x-mii)
Buggy python submission (verdict: Time Limit Exceeded):
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
for i in range(t):
    a += v
    b += w

if a >= b:
    print('YES')
else:
    print('NO')

Fixed submission:
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
flg = 1
if a > b:
    flg = -1

a = a+v*t*flg
b = b+w*t*flg

if flg == 1:
    if a >= b:
        print('YES')
    else:
        print('NO')
else:
    if a <= b:
        print('YES')
    else:
        print('NO')
Buggy python submission (verdict: Runtime Error):
n, t = map(int, input().split())
c = 999
for i in range(n):
    tmp = input().split()
    if t <= tmp[1]:
        if tmp[0] < c:
            c = tmp[0]
if c == 999:
    print('TLE')
    exit()
else:
    print(c)

Fixed submission:
n, t = map(int, input().split())
c = 10000
for i in range(n):
    tmp = input().split()
    if t >= int(tmp[1]):
        if int(tmp[0]) < c:
            c = int(tmp[0])
if c == 10000:
    print('TLE')
    exit()
else:
    print(c)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(input()) for _ in range(n)]
a_set = set(a)
result = 0
def ct(i, a, result):
    cnt = a.count(i)
    if cnt % 2 == 1:
        result += 1
    return result

for i in a_set:
    result = ct(i, a, result)

print(result)

Fixed submission:
import collections
n = int(input())
a = [int(input()) for _ in range(n)]
result = 0
cnt = collections.Counter(a)
for i in cnt.values():
    if i % 2 == 1:
        result += 1

print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = []
result = 0
for i in range(n):
    a.append(int(input()))

paper = set(a)
for j in paper:
    count = a.count(j)
    if count % 2 == 1:
        result += 1

print(result)


Fixed submission:
import collections
n = int(input())
a = [int(input()) for _ in range(n)]
result = 0
cnt = collections.Counter(a)
for i in cnt.values():
    if i % 2 == 1:
        result += 1

print(result)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = []
for i in range(n):
    num = int(input())
    try:
        a.remove(num)
    except:
        a.append(num)
print(len(a))


Fixed submission:
import collections
n = int(input())
a = [int(input()) for _ in range(n)]
result = 0
cnt = collections.Counter(a)
for i in cnt.values():
    if i % 2 == 1:
        result += 1

print(result)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

if n == 1:
    print(1)
    exit()
elif n == 2:
    if abs(a[0] - a[1]) <= 2:
        print(2)
        exit()
    else:
        print(1)
        exit()

al = [0]*(max(a)+1)
for i in a:
    al[i] += 1
index = al.index(max(al))

if index == min(a):
    index += 1
elif index == max(a):
    index -= 1

print(al[index-1] + al[index] + al[index+1])


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
al = [0]*(10**5+2)

for i in a:
    al[i] += 1
    al[i+1] += 1
    al[i+2] += 1

print(max(al))

Buggy python submission (verdict: Runtime Error):
x = int(input())
a = list(map(int, input().split()))
al = [0]*(max(a)+1)
for i in a:
    al[i] += 1
index = al.index(max(al))

if index == 1:
    index += 1
elif index == max(a)-1:
    index -= 1

if x == 1:
    print(x)
elif x == 2:
    if abs(a[0] - a[1]) <= 1:
        print(2)
    else:
        print(1) 
else:
    print(al[index-1] + al[index] + al[index+1])


Fixed submission:
n = int(input())
a = list(map(int, input().split()))
al = [0]*(10**5+2)

for i in a:
    al[i] += 1
    al[i+1] += 1
    al[i+2] += 1

print(max(al))

Buggy python submission (verdict: Time Limit Exceeded):
x = int(input())
a = list(map(int, input().split()))
al = [0]*x
for i in range(x):
    for j in range(x):
        abst = abs(i - a[j])
        if abst == 1 or abst == 0:
            al[i] += 1

print(max(1, max(al)))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
al = [0]*(10**5+2)

for i in a:
    al[i] += 1
    al[i+1] += 1
    al[i+2] += 1

print(max(al))
Buggy python submission (verdict: Runtime Error):
from fractions import gcd

n = int(input())
t = [int(input()) for _ in range(n)]
cm = []
t.sort()

def lcm(x, y):
    return (x * y) // gcd(x, y)

for i in range(n-1):
    cm.append(lcm(t[i], t[i+1]))

print(max(cm))

Fixed submission:
from fractions import gcd

n = int(input())
t = [int(input()) for _ in range(n)]
result = 1


for i in range(n):
    num = t[i]
    result = result * num // gcd(result, num)

print(result)

Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
t = [int(input()) for _ in range(n)]
cm = []
t.sort()

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

for i in range(n-1):
    cm.append(lcm(t[i], t[i+1]))

print(max(cm))

Fixed submission:
from fractions import gcd

n = int(input())
t = [int(input()) for _ in range(n)]
result = 1


for i in range(n):
    num = t[i]
    result = result * num // gcd(result, num)

print(result)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
A, B = [0]*n, [0]*n
ans = 'IMPOSSIBLE'
for i in range(m):
    a, b = map(int, input().split())
    if a == 1:
        A[b-1] += 1
    if b == n:
        B[a-1] += 1

for i in range(m):
    if A[i] == 1 and B[i] == 1:
        ans = 'POSSIBLE'
        break
print(ans)

Fixed submission:
n, m = map(int, input().split())
A, B = [0]*n, [0]*n
ans = 'IMPOSSIBLE'
for i in range(m):
    a, b = map(int, input().split())
    if a == 1:
        A[b-1] += 1
    if b == n:
        B[a-1] += 1
if sum(B) == 0:
    print(ans)
    exit()
else:
    for i in range(n):
        if A[i] == 1 and B[i] == 1:
            ans = 'POSSIBLE'
            break
    print(ans)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
A, B = [0]*n, [0]*n
ans = 'IMPOSSIBLE'
for i in range(m):
    a, b = map(int, input().split())
    if a == 1:
        A[b-1] += 1
    if b == n:
        B[a-1] += 1

if sum(B) == 0:
    print(ans)
    exit()
else:
    for i in range(m):
        if A[i] == 1 and B[i] == 1:
            ans = 'POSSIBLE'
            break
print(ans)

Fixed submission:
n, m = map(int, input().split())
A, B = [0]*n, [0]*n
ans = 'IMPOSSIBLE'
for i in range(m):
    a, b = map(int, input().split())
    if a == 1:
        A[b-1] += 1
    if b == n:
        B[a-1] += 1
if sum(B) == 0:
    print(ans)
    exit()
else:
    for i in range(n):
        if A[i] == 1 and B[i] == 1:
            ans = 'POSSIBLE'
            break
    print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
b = []
c = ''
 
for i in range(n):
    b.append(a[i])
    b.reverse()
print(*b)

Fixed submission:
n = int(input())
a = list(input().split())
result = list(reversed(a))[::2]

if n % 2 == 0:
    result += a[::2]
else:
    result += a[1::2]

print(*result)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
b = []
c = ''

for i in range(n):
    b.append(a[i])
    b.reverse()
for j in b:
    c += str(j) + ' '
print(c)

Fixed submission:
n = int(input())
a = list(input().split())
result = list(reversed(a))[::2]

if n % 2 == 0:
    result += a[::2]
else:
    result += a[1::2]

print(*result)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(input()) for _ in range(n)]
button = [0]*n
button1 = a[0] - 1
count = 1
try:
    fst = a.index(2)
    if fst == 0:
        print('1')
        exit()
except ValueError:
    print('-1')
    exit()

for i in range(n):
    button[button1] += 1
    button1 = a[button1] - 1
    if button[1] == 1:
        print(count)
        break
    try:
        button.remove(2)
        print('-1')
        break
    except:
        count += 1
        pass

Fixed submission:
n = int(input())
a = [int(input()) for _ in range(n)]
now = a[0]
c = 1

if now == 2:
    print(1)
    exit()

for i in range(n):
    now = a[now-1]
    c += 1
    if now == 2:
        print(c)
        exit()
print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(input()) for _ in range(n)]
button = [0]*n
button1 = a[0] - 1
count = 1
try:
    _ = a.index(2)
except:
    print('-1')
    exit()
while True:
    button[button1] += 1
    button1 = a[button1] - 1
    if button[1] == 1:
        print(count)
        break
    try:
        button.remove(2)
        print('-1')
        break
    except:
        count += 1
        pass

Fixed submission:
n = int(input())
a = [int(input()) for _ in range(n)]
now = a[0]
c = 1

if now == 2:
    print(1)
    exit()

for i in range(n):
    now = a[now-1]
    c += 1
    if now == 2:
        print(c)
        exit()
print(-1)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [int(input()) for _ in range(n)]
button = [0]*n
button1 = a[0] - 1
try:
    a.remove(2)
    print('01')
    exit()
except:
    pass
count = 1
while True:
    button[button1] += 1
    button1 = a[button1] - 1
    if button[1] == 1:
        print(count)
        break
    try:
        button.remove(2)
        print('-1')
        break
    except:
        count += 1
        pass

Fixed submission:
n = int(input())
a = [int(input()) for _ in range(n)]
now = a[0]
c = 1

if now == 2:
    print(1)
    exit()

for i in range(n):
    now = a[now-1]
    c += 1
    if now == 2:
        print(c)
        exit()
print(-1)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(input()) for _ in range(n)]
button = [0]*n
button1 = a[0] - 1
count = 1
while True:
    button[button1] += 1
    button1 = a[button1] - 1
    if button[1] == 1:
        print(count)
        break
    try:
        button.remove(2)
        print('-1')
        break
    except:
        count += 1
        pass

Fixed submission:
n = int(input())
a = [int(input()) for _ in range(n)]
now = a[0]
c = 1

if now == 2:
    print(1)
    exit()

for i in range(n):
    now = a[now-1]
    c += 1
    if now == 2:
        print(c)
        exit()
print(-1)
Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
result = [0 for _ in range(m)]
for i in range(m):
    a, b = map(int, input().split())
    result[a-1] += 1
    result[b-1] += 1

for j in result:
    print(j)



Fixed submission:
n, m = map(int, input().split())
result = [0 for _ in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    result[a-1] += 1
    result[b-1] += 1

for j in result:
    print(j)
Buggy python submission (verdict: Runtime Error):
n = int(input())
low, upper = [], []
i = 1
while i*i <= n:
    if n % i == 0:
        low.append(i)
        if i != n//i:
            upper.append(n//i)

    i += 1
print(len(str(min(upper))))

Fixed submission:
n = int(input())
num = 1
for i in range(1, int(n**0.5)+1):
    if n % i == 0:
       num = i

ans = len(str(max(num, n // num)))
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
a,b,x = map(int, input().split())
c = 0
for i in range(a, b+1):
    if i % x == 0:
        c += 1

print(c)

Fixed submission:
a,b,x = map(int, input().split())
b = b // x+1
if a != 0:
    a = (a-1) // x+1

print(b - a)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())

cnt=0
for i in range(1,n+1):
  for j in range(1,n+1):
    if i*j>=n:
      break
    else:
      cnt+=1
      
print(cnt)

Fixed submission:
n = int(input())
ans = 0
for a in range(1, n):
  ans += (n - 1) // a
print(ans)
Buggy python submission (verdict: Runtime Error):
s=input()
t=input()

if len(s)==len(t):
  num=0
  for i,j in zip(s,t):
    if i!=j:
      num+=1
else:
  for i in range(len(s)-len(t)+1):
    a=s[i:len(t)+i]
    num=0
    for i,j in zip(t,a):
      if i!=j:
        num+=1
    num=min(1000,num)

print(num)
    
    

Fixed submission:
d,t,s=map(int,input().split())

num=t*s

if num>=d:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

n=int(input())
l=list(map(int,input().split()))

mod = 10**9 + 7

ans=0
for i,j in itertools.combinations(l, 2):
  num=i*j
  ans+=num
  
print(ans%mod)


Fixed submission:
n=int(input())
l=list(map(int,input().split()))

sum_l=sum(l)
ans=0
mod=10**9+7

for i in range(n):
  sum_l-=l[i]
  ans+=l[i]*sum_l
  
print(ans%mod)
Buggy python submission (verdict: Runtime Error):
n=int(input())
ac=0
wa=0
tle=0
re=0

for i in range(n):
  num=str(input())
  if num=="AC":
    ac+=1
  elif num=="WA":
    wa+=1
  elif num=="TLE":
    tle+=1
  else num=="RE":
    re+=1
    
print("AC × {}".format(ac))
print("WA × {}".format(wa))
print("TLE × {}".format(tle))
print("RE × {}".format(re))


Fixed submission:
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  num=str(input())
  if num=="AC":
    ac+=1
  elif num=="WA":
    wa+=1
  elif num=="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))

Buggy python submission (verdict: Runtime Error):
n=int(input())
ac=0
wa=0
tle=0
re=0

for i in range(n):
  num=str(input())
  if num=="AC":
    ac+=1
  elif num=="WA":
    wa+=1
  elif num=="TLE":
    tle+=1
  else num=="RE":
    re+=1
   

print("AC × {}".format(ac)
print("WA × {}".format(wa)
print("TLE × {}".format(tle)
print("RE × {}".format(re)


Fixed submission:
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  num=str(input())
  if num=="AC":
    ac+=1
  elif num=="WA":
    wa+=1
  elif num=="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))

Buggy python submission (verdict: Runtime Error):
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  num=str(input())
  if num=="AC":
    ac+=1
  elif num=="WA":
    wa+=1
  elif num=="TLE":
    tle+=1
  else num=="RE":
    re+=1
   

print("AC ×"{}.format(ac)
print("WA ×"{}.format(wa)
print("TLE ×"{}.format(tle)
print("RE ×"{}.format(re)


Fixed submission:
n=int(input())
ac=0
wa=0
tle=0
re=0
for i in range(n):
  num=str(input())
  if num=="AC":
    ac+=1
  elif num=="WA":
    wa+=1
  elif num=="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))