Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
N,M = map(int,input().split())

ans = 0

while True:
    if N == 0 or M == 1 or M == 0:
        break

    N -= 1
    M -= 2
    ans += 1

if N == 0:
    while True:
        M -= 4
        if M >= 0:
            ans += 1
        else:
            break

print(ans)


Fixed submission:
import math
N,M = map(int,input().split())

ans = 0

if N*2 <= M:
    ans += N
    M -= 2*N
    N = 0
    if M >= 4:
        ans += math.floor(M / 4)
else:
    ans += M/2
print(int(ans))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
a,b = map(int,input().split())
for i in range(N-1):
    aa,bb = map(int,input().split())
    taa,tbb = aa,bb
    while True:
        if aa >= a and bb >=b:
            break
        aa += taa
        bb += tbb
    a,b = aa,bb
print(a+b)


Fixed submission:
N = int(input())
a,b = 1,1
for i in range(N):
    aa,bb = map(int,input().split())
    k = max((a+aa-1)//aa,(b+bb-1)//bb)
    aa *= k
    bb *= k
    a,b = aa,bb

print(a+b)
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
h=int(input())
print((a+b)＊h/2)

Fixed submission:
a=int(input())
b=int(input())
h=int(input())
print((a+b)*h//2)
Buggy python submission (verdict: Runtime Error):
N,A = map(int,input().split())
x = list(map(int,input().split()))
xsum =sum(x)

dp = [ [ [ 0 for j in range(N+1)] for i in range(xsum+1) ] for k in range(N+1)]
dp[0][0][0] = 1
for i in range(N):
    for j in range(xsum+1):
        for k in range(N):
            if j - x[i] >=0:
                dp[i+1][j][k+1] = dp[i][j-x[i]][k]
            dp[i+1][j][k] += dp[i][j][k]

ans = 0
for k in range(1,N+1):
    ans += dp[N][A*k][k]
print(ans)


Fixed submission:
N,A = map(int,input().split())
x = list(map(int,input().split()))
xsum =sum(x)

dp = [ [ [ 0 for j in range(N+1)] for i in range(2501) ] for k in range(N+1)]
dp[0][0][0] = 1
for i in range(N):
    for j in range(2501):
        for k in range(N):
            if j - x[i] >=0:
                dp[i+1][j][k+1] = dp[i][j-x[i]][k]
            dp[i+1][j][k] += dp[i][j][k]

ans = 0
for k in range(1,N+1):
    ans += dp[N][A*k][k]
print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
l = []
t = s[0]
m = 1
for i in range(1,len(s)):
    if s[i] == t:
        m += 1
    else:
        t = s[i]
        l.append(m)
        m = 1
l.append(m)

if max(l) == 1:
    print(-1,-1)
    exit()
if len(l) == 1:
    print(1,l[0])
if l[0] > 1:
    print(1,l[0]+l[1])
    exit()

ruiseki = [l[0]]
for i in range(1,len(l)):
    ruiseki.append(ruiseki[i-1] + l[i])

for i in range(len(ruiseki)-1):
    if ruiseki[i+1] - ruiseki[i] > 1 and i != len(ruiseki) - 2:
        print(ruiseki[i],ruiseki[i+1])
        exit()
    if ruiseki[i+1] - ruiseki[i] > 1 and i == len(ruiseki) - 2:
        print(ruiseki[i],ruiseki[i+1])
        exit()


Fixed submission:
s = input()
l = []
t = s[0]
m = 1
for i in range(1,len(s)):
    if s[i] == t:
        m += 1
    else:
        t = s[i]
        l.append(m)
        m = 1
l.append(m)

if len(l) == 1:
    print(1,l[0])
    exit()
if l[0] > 1:
    print(1,l[0]+l[1])
    exit()

for i in range(len(s)-2):
    if s[i] == s[i+2] and s[i] != s[i+1]:
        print(i+1,i+3)
        exit()
if max(l) == 1:
    print(-1,-1)
    exit()

ruiseki = [l[0]]
for i in range(1,len(l)):
    ruiseki.append(ruiseki[i-1] + l[i])

for i in range(len(ruiseki)-1):
    if ruiseki[i+1] - ruiseki[i] > 1:
        print(ruiseki[i],ruiseki[i+1])
        exit()
Buggy python submission (verdict: Time Limit Exceeded):
from _collections import defaultdict

N = int(input())
S = input()

counted_dict = defaultdict(list)
for i in range(N):
    char = S[i]
    if char == "R":
        counted_dict["R"].append(i)
    elif char == "G":
        counted_dict["G"].append(i)
    else:
        counted_dict["B"].append(i)

count = 0
for x in range(len(counted_dict["R"])):
    r_pos = counted_dict["R"][x]
    for y in range(len(counted_dict["G"])):
        g_pos = counted_dict["G"][y]
        for z in range(len(counted_dict["B"])):
            b_pos = counted_dict["B"][z]
            colors_pos_list = [r_pos, g_pos, b_pos]
            colors_pos_list.sort()
            if not colors_pos_list[2] + colors_pos_list[0] == 2 * colors_pos_list[1]:
                count += 1

print(count)


Fixed submission:
N = int(input())
S = input()

total_comb = S.count('R')*S.count('G')*S.count('B')

minus = 0
for i in range(N-2):
    for j in range(i+1, N):
        k = 2*j - i
        if k < N:
            if (S[i] != S[j]) and (S[j] != S[k]) and (S[k] != S[i]):
                minus += 1

print(total_comb - minus)

Buggy python submission (verdict: Time Limit Exceeded):
from _collections import defaultdict

N = int(input())
S = input()

counted_dict = defaultdict(list)
for i in range(N):
    char = S[i]
    if char == "R":
        counted_dict["R"].append(i)
    elif char == "G":
        counted_dict["G"].append(i)
    else:
        counted_dict["B"].append(i)

count = 0
for x in range(len(counted_dict["R"])):
    r_pos = counted_dict["R"][x]
    for y in range(len(counted_dict["G"])):
        g_pos = counted_dict["G"][y]
        for z in range(len(counted_dict["B"])):
            b_pos = counted_dict["B"][z]
            colors_pos_list = [r_pos, g_pos, b_pos]
            colors_pos_list.sort()
            if not colors_pos_list[2] + colors_pos_list[0] == 2 * colors_pos_list[1]:
                count += 1

print(count)


Fixed submission:
N = int(input())
S = input()

total_comb = S.count('R')*S.count('G')*S.count('B')

minus = 0
for i in range(N-2):
    for j in range(i+1, N):
        k = 2*j - i
        if k < N:
            if (S[i] != S[j]) and (S[j] != S[k]) and (S[k] != S[i]):
                minus += 1

print(total_comb - minus)
Buggy python submission (verdict: Runtime Error):
X, Y, Z = map(int, input().split())
print(f"{Z} {X} {Y}")


Fixed submission:
X, Y, Z = map(int, input().split())
print(Z, X, Y)

Buggy python submission (verdict: Runtime Error):
X, Y, Z = map(int, input().split())
print(f"{Z} {X} {Y}")


Fixed submission:
X, Y, Z = map(int, input().split())
print(Z, X, Y)
Buggy python submission (verdict: Runtime Error):
X, Y = map(int, input().split())

prize_list = [100000, 200000, 300000]

ans = prize_list[3-X] + prize_list[3-Y]
if X == 1 and Y == 1:
    ans += 400000
print(ans)

Fixed submission:
X, Y = map(int, input().split())

prize_list = [300000, 200000, 100000]

ans = 0
if X <= 3:
    ans += prize_list[X-1]
if Y <= 3:
    ans += prize_list[Y-1]
if X == 1 and Y == 1:
    ans += 400000
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
def z_advanced(s, Z_max):
    """An advanced computation of Z-values of a string."""

    Z = [0] * len(s)
    Z[0] = len(s)

    rt = 0
    lt = 0

    for k in range(1, len(s)):
        if k > rt:
            # If k is outside the current Z-box, do naive computation.
            n = 0
            while n + k < len(s) and s[n] == s[n+k]:
                n += 1
            Z[k] = n
            if n > 0:
                lt = k
                rt = k+n-1
        else:
            # If k is inside the current Z-box, consider two cases.

            p = k - lt  # Pair index.
            right_part_len = rt - k + 1

            if Z[p] < right_part_len:
                Z[k] = Z[p]
                    
            else:
                i = rt + 1
                while i < len(s) and s[i] == s[i - k]:
                    i += 1
                Z[k] = i - k

                lt = k
                rt = i - 1
                
        Z_max = max(Z_max, min(k, Z[k]))  # check_k_zk()を参考のこと
    
    # return Z, Z_max
    return Z_max
  
N = int(input())
S = input()
Z_max = 0
for i in range(N):
    Z_max = z_advanced(S[i:], Z_max)

print(Z_max)

Fixed submission:
def z_advanced(s, Z_max):
    """An advanced computation of Z-values of a string."""

    Z = [0] * len(s)
    Z[0] = len(s)

    rt = 0
    lt = 0

    for k in range(1, len(s)):
        if k > rt:
            # If k is outside the current Z-box, do naive computation.
            n = 0
            while n + k < len(s) and s[n] == s[n+k]:
                n += 1
            Z[k] = n
            if n > 0:
                lt = k
                rt = k+n-1
        else:
            # If k is inside the current Z-box, consider two cases.

            p = k - lt  # Pair index.
            right_part_len = rt - k + 1

            if Z[p] < right_part_len:
                Z[k] = Z[p]
                    
            else:
                i = rt + 1
                while i < len(s) and s[i] == s[i - k]:
                    i += 1
                Z[k] = i - k

                lt = k
                rt = i - 1
                
        Z_max = max(Z_max, min(k, Z[k]))  # check_k_zk()を参考のこと
    
    # return Z, Z_max
    return Z_max
  
N = int(input())
S = input()
Z_max = 0
for i in range(N):
    Z_max = z_advanced(S[i:], Z_max)

print(Z_max)
Buggy python submission (verdict: Runtime Error):
import itertools
L, R = map(int, input().split())

if R - L + 1 > 2019:
    remainder_list = [N%2019 for N in range(L, L+2019)]
else:
    remainder_list = [N%2019 for N in range(L, R+1)]  
remainder_list = list(set(remainder_list))
all_list = [(i*j)%2019 for i, j in list(itertools.combinations(remainder_list, 2))]
print(min(all_list))

Fixed submission:
N, A, B = map(int, input().split())
if N*A > B:
    print(B)
else:
    print(N*A)
Buggy python submission (verdict: Time Limit Exceeded):
import itertools
L, R = map(int, input().split())
 
remainder_list = [N%2019 for N in range(L, R+1)]
remainder_list = list(set(remainder_list))
all_list = [(i*j)%2019 for i, j in list(itertools.combinations(remainder_list, 2))]
print(min(all_list))

Fixed submission:
import itertools
L, R = map(int, input().split())

if R - L + 1 > 2019:
    remainder_list = [N%2019 for N in range(L, L+2019)]
else:
    remainder_list = [N%2019 for N in range(L, R+1)]  
remainder_list = list(set(remainder_list))
all_list = [(i*j)%2019 for i, j in list(itertools.combinations(remainder_list, 2))]
print(min(all_list))

Buggy python submission (verdict: Runtime Error):
import itertools
L, R = map(int, input().split())
 
remainder_list = []
for N in range(L, R+1):
  remainder_list.append(N%2019)

for i, j in list(itertools.combinations(remainder_list, 2)):
  all_list.append((i*j)%2019)
  
print(min(all_list))

Fixed submission:
import itertools
L, R = map(int, input().split())

if R - L + 1 > 2019:
    remainder_list = [N%2019 for N in range(L, L+2019)]
else:
    remainder_list = [N%2019 for N in range(L, R+1)]  
remainder_list = list(set(remainder_list))
all_list = [(i*j)%2019 for i, j in list(itertools.combinations(remainder_list, 2))]
print(min(all_list))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
L, R = map(int, input().split())
 
remainder_list = [N%2019 for N in range(L, R+1)]
all_list = [(i*j)%2019 for i, j in list(itertools.combinations(remainder_list, 2))]
print(min(all_list))

Fixed submission:
import itertools
L, R = map(int, input().split())

if R - L + 1 > 2019:
    remainder_list = [N%2019 for N in range(L, L+2019)]
else:
    remainder_list = [N%2019 for N in range(L, R+1)]  
remainder_list = list(set(remainder_list))
all_list = [(i*j)%2019 for i, j in list(itertools.combinations(remainder_list, 2))]
print(min(all_list))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
L, R = map(int, input().split())
 
remainder_list = [N%2019 for N in range(L, R+1)]
all_list = [(i*j)%2019 for i, j in list(itertools.combinations(remainder_list, 2))]
print(min(all_list))

Fixed submission:
import itertools
L, R = map(int, input().split())

if R - L + 1 > 2019:
    remainder_list = [N%2019 for N in range(L, L+2019)]
else:
    remainder_list = [N%2019 for N in range(L, R+1)]  
remainder_list = list(set(remainder_list))
all_list = [(i*j)%2019 for i, j in list(itertools.combinations(remainder_list, 2))]
print(min(all_list))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
L, R = map(int, input().split())

remainder_list = [N%2019 for N in range(L, R+1)]
all_list = [(i*j)%2019 for i, j in list(itertools.combinations(remainder_list, 2))]
print(min(all_list))


Fixed submission:
import itertools
L, R = map(int, input().split())

if R - L + 1 > 2019:
    remainder_list = [N%2019 for N in range(L, L+2019)]
else:
    remainder_list = [N%2019 for N in range(L, R+1)]  
remainder_list = list(set(remainder_list))
all_list = [(i*j)%2019 for i, j in list(itertools.combinations(remainder_list, 2))]
print(min(all_list))
Buggy python submission (verdict: Runtime Error):
N = int(input())
all_point_list = [input().split() for _ in range(N)]
for each_list in all_point_list:
    each_list[1] = int(each_list[1])
sorted_all_list = sorted(all_point_list)
for sorted_point in sorted_all_list:
    print(all_point_list.index(sorted_point+1))

Fixed submission:
N = int(input())
all_point_list = [input().split() for _ in range(N)]
for each_list in all_point_list:
    each_list[1] = int(each_list[1])
sorted_all_list = sorted(all_point_list, key=lambda x:(x[0], -x[1]))
for sorted_point in sorted_all_list:
    print(all_point_list.index(sorted_point) + 1)
Buggy python submission (verdict: Runtime Error):
from copy import deepcopy


aps_S = input()
T = input()

S = deepcopy(aps_S)

for i in range(len(aps_S) - len(T) + 1):
    matched_flag = True
    for j in range(len(T)):
        if aps_S[-i-j-1] != T[-j-1] and aps_S[i-j] != '?':
            matched_flag = False
            continue

    if matched_flag:
        S[-i-len(T)-1:-i-1] = T
        S = S.replace('?', 'a')
        print(S)
        break

if not matched_flag:
    print('UNRESTORABLE')

Fixed submission:
from copy import deepcopy


def calc_key_str(aps_S, T):
    S = deepcopy(aps_S)

    for i in range(len(aps_S) - len(T) + 1):
        matched_flag = True
        for j in range(len(T)):
            if aps_S[-i-j-1] != T[-j-1] and aps_S[-i-j-1] != '?':
                matched_flag = False
                continue

        if matched_flag:
            S_list = list(S)
            S_list[-i-len(T):len(S)-i] = T
            S = "".join(S_list)
            S = S.replace('?', 'a')
            print(S)
            break

    if not matched_flag:
        print('UNRESTORABLE')


def main():
    aps_S = input()
    T = input()

    if len(aps_S) < len(T):
        print('UNRESTORABLE')
    else:
        calc_key_str(aps_S, T)


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Time Limit Exceeded):
from math import factorial
from collections import defaultdict


ball_num = int(input().rstrip())
points = [int(n) for n in input().rstrip().split()]

for ban_i in range(ball_num):
    point_dict=defaultdict(int)
    pattern_num=0
    for i in range(ball_num):
        if i==ban_i:
            continue

        point_dict[points[i]]+=1
        
    for j in point_dict:
        if point_dict[j]>=2:
            
            pattern_num += factorial(point_dict[j])//(2*factorial(point_dict[j]-2))
            
        
    print(pattern_num)

Fixed submission:
from collections import defaultdict


ball_num = int(input().rstrip())
points = [int(n) for n in input().rstrip().split()]
point_dict=defaultdict(int)
total_pattern=0

for i in range(ball_num):
    point_dict[points[i]]+=1
for j in point_dict:
    total_pattern += point_dict[j]*(point_dict[j]-1)//2
    
total_pattern0=total_pattern
for ban_i in range(ball_num):
    total_pattern0 -= point_dict[points[ban_i]]*(point_dict[points[ban_i]]-1)//2         
    total_pattern0 += (point_dict[points[ban_i]]-1)*(point_dict[points[ban_i]]-2)//2
        
    print(total_pattern0)
    total_pattern0=total_pattern
Buggy python submission (verdict: Runtime Error):
from collections import deque


reverse = False

string = deque(input().rstrip())
operate_times = int(input().rstrip())

for i in range(operate_times):
    row = input().rstrip()
    if row[0]=='1':
        if reverse==True:
            reverse = False
        else:
            reverse = True
    
    if row[0]=='2':
        row = row.split()
        head_or_tail = row[1]
        add_string = row[2]

        if reverse==True:
            if head_or_tail==1:
                string.append(add_string)
            else:
                string.appendleft(add_string)
        
        else:
            if head_or_tail==2:
                string.append(add_string)
            else:
                string.appendleft(add_string)


if reverse==True:
    string = string[::-1]

print(''.join(string))


Fixed submission:
from collections import deque


reverse = False

string = deque(input().rstrip())
operate_times = int(input().rstrip())

for i in range(operate_times):
    row = input().rstrip()
    if row[0]=='1':
        if reverse:
            reverse = False
        else:
            reverse = True
    
    if row[0]=='2':
        row = row.split()
        head_or_tail = int(row[1])
        add_string = row[2]

        if reverse:
            if head_or_tail==1:
                string.append(add_string)
            else:
                string.appendleft(add_string)
        
        else:
            if head_or_tail==2:
                string.append(add_string)
            else:
                string.appendleft(add_string)


answer_string = ''
if reverse:
    for _ in range(len(string)):
        right = string.pop()
        answer_string+=right
    print(answer_string)
else:
    print(''.join(string))
Buggy python submission (verdict: Runtime Error):
points = [int(n) for n in input().rstrip().split()]

sum = sum(points[:use_num])
max_sum = sum
    
for i in range(dice_num-use_num):
    next = sum + points[i+use_num] - points[i]
    max_sum = max(next,max_sum)
    sum = next
    
max_sum_expectation = (use_num + max_sum)/2

print(max_sum_expectation)

Fixed submission:
dice_num, use_num = [int(n) for n in input().rstrip().split()]

points = [int(n) for n in input().rstrip().split()]

sum = sum(points[:use_num])
max_sum = sum
    
for i in range(dice_num-use_num):
    next = sum + points[i+use_num] - points[i]
    max_sum = max(next,max_sum)
    sum = next
    
max_sum_expectation = (use_num + max_sum)/2

print(max_sum_expectation)
Buggy python submission (verdict: Runtime Error):
n=int(input())
s=int(input())

def f(b,n):
	if n < b:
		return n
	else:
		return f(b,n//b)+n%b

ans=-1
if s>n:
  pass
elif s==n:
	ans=n+1
else:
	for _b in range(2,int(n**0.5)+1):
		if f(_b,n)==s:
			ans=_b
			break
	if ans==-1:
		for _p in range(1,int(n**0.5)+1):
			_b = (n-s)//_p+1
			if f(_b,n)==s:
				ans=_b
				break
print(ans)

Fixed submission:
n=int(input())
s=int(input())

def f(b,n):
	if b < 2:
		return 0
	if n < b:
		return n
	else:
		return f(b,n//b)+n%b

ans=-1
if s==n:
	ans=n+1
else:
	for _b in range(2,int(n**0.5)+1):
		if f(_b,n)==s:
			ans=_b
			break
	if ans==-1:
		for _p in range(int(n**0.5),0,-1):
			_b = (n-s)//_p+1
			if f(_b,n)==s:
				ans=_b
				break
print(ans)
Buggy python submission (verdict: Runtime Error):
from ctypes import c_longlong as ll

n = ll(input(""))
m = ll(input(""))
n= n % m
print(min(n, m-n))

Fixed submission:
import numpy

n, m = input().split()
n = numpy.int64(n)
m = numpy.int64(m)
n = n % m
print(min(n, m-n))
Buggy python submission (verdict: Runtime Error):
H, W = map(int, input().split)
S=H*W
if S%2 ==1:
  print(H*W//2+1)
  
else:
  print(H*W/2)

Fixed submission:
H, W = map(int, input().split())

if H==1 or W==1:
  print(1)
elif H%2 == 1 and W%2 == 1:
  print((H*W)//2+1)
  
else:
  print((H*W)//2)
Buggy python submission (verdict: Runtime Error):
import numpy as np
 
N = input()
X = list(map(int, input()))
ans=0
for P in range(max(X)):
  sum = np.sum(list(map(lambda x: (x-P)**2, X)))
    
  if sum >= ans:
    ans = sum
    
print(ans)

Fixed submission:
import numpy as np
 
N = input()
X = list(map(int, input().split()))
ans=9999999
for P in range(0, 101):
  sum = np.sum(list(map(lambda x: (x-P)**2, X)))
  ans = min(ans, sum)
    
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np
 
N = input()
X = list(map(int, input()))
ans=0
for P in range(max(X)):
  sum = np.sum(map(lambda x: (x-P)**2, X))
    
  if sum >= ans:
    ans = sum
    
print(ans)

Fixed submission:
import numpy as np
 
N = input()
X = list(map(int, input().split()))
ans=9999999
for P in range(0, 101):
  sum = np.sum(list(map(lambda x: (x-P)**2, X)))
  ans = min(ans, sum)
    
print(ans)

Buggy python submission (verdict: Runtime Error):
import numpy as np

N = input()
X = list(map(int, input()))
ans=0
for P in range(max(X)):
  sum = np.sum(map(lambda:x (x-P)**2, X))
    
  if sum >= ans:
    ans = sum
    
print(ans)

Fixed submission:
import numpy as np
 
N = input()
X = list(map(int, input().split()))
ans=9999999
for P in range(0, 101):
  sum = np.sum(list(map(lambda x: (x-P)**2, X)))
  ans = min(ans, sum)
    
print(ans)

Buggy python submission (verdict: Runtime Error):
def sqerr(x, t):
  return (x - t)**2

N = input()
X = list(map(int, input()))
ans=0
for P in range(1, N+1):
  sum = 0
  for x in X:
    sum += (x-P)**2
    
  if sum > ans:
    ans = sum
    
print(ans)

Fixed submission:
import numpy as np
 
N = input()
X = list(map(int, input().split()))
ans=9999999
for P in range(0, 101):
  sum = np.sum(list(map(lambda x: (x-P)**2, X)))
  ans = min(ans, sum)
    
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N=int(input())
P=list(map(int, input().split()))

count=0
for i in range(1,N+1):
  if min(P[:i])==P[i-1]:
    count+=1
  
print(count)

Fixed submission:
N=int(input())
P=list(map(int, input().split()))
m=9999999
count=0
for i in range(1,N+1):
  if m>=P[i-1]:
    count+=1
    m=P[i-1]
  
print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
 
ans = -1
for i in range(N):
	if math.floor(float(i)*1.08) == N:
    	ans = i
      
if ans == -1:
  print(':(')
  
else:
  print(ans)

Fixed submission:
import math

N = int(input())
ans = -1
for i in range(N+1):
	if math.floor(i*1.08) == N:
		ans = i
if ans == -1:
	print(':(')
else:
	print(ans)

Buggy python submission (verdict: Runtime Error):
import math

N = int(input())
 
ans = -1
for i in range(N):
	if math.floor(i*1.08) == N:
    	ans = i
      
if ans == -1:
  print(':(')
  
else:
  print(ans)

Fixed submission:
import math

N = int(input())
ans = -1
for i in range(N+1):
	if math.floor(i*1.08) == N:
		ans = i
if ans == -1:
	print(':(')
else:
	print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
 
ans = -1
for i in range(N):
	if round(i*1.08) == N:
    	ans = i
      
if ans == -1:
	print(':(')
  
else:
	print(ans)

Fixed submission:
import math

N = int(input())
ans = -1
for i in range(N+1):
	if math.floor(i*1.08) == N:
		ans = i
if ans == -1:
	print(':(')
else:
	print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
 
ans = -1
for i in range(N):
	if round(i*1.08) == N:
    	ans = i
      
if ans == -1:
  print(':(')
  
else:
  print(ans)

Fixed submission:
import math

N = int(input())
ans = -1
for i in range(N+1):
	if math.floor(i*1.08) == N:
		ans = i
if ans == -1:
	print(':(')
else:
	print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())

ans = -1
for i in range(N)
	if round(i*1.08) == N:
    	ans = i
      
if ans == -1:
  print(':(')
  
else:
  print(ans)

Fixed submission:
import math

N = int(input())
ans = -1
for i in range(N+1):
	if math.floor(i*1.08) == N:
		ans = i
if ans == -1:
	print(':(')
else:
	print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split()))

s = []
for i in range(1,N+1):
  print(A.index(i)+1, end=' ')

Fixed submission:
N = int(input())
A = list(map(int, input().split()))

l = [0]*N
for i,a in enumerate(A):
  l[a-1]=i+1
  
for x in l:
  print(x, end=' ')

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
N = int(input())
A = list(map(int, input().split()))

s = []
for i in range(1,N+1):
  s.append(A.index(i)+1)
  
[print(x, end=' ') for x in s]

Fixed submission:
N = int(input())
A = list(map(int, input().split()))

l = [0]*N
for i,a in enumerate(A):
  l[a-1]=i+1
  
for x in l:
  print(x, end=' ')