Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Time Limit Exceeded):
n, m = map(int, input().split())
baitos = [list(map(int, (input().split()))) for _ in range(n)]
baitos = sorted(baitos, key=(lambda x: x[0]))

max = 0
available_works = []
for shigotobi in reversed(range(m)):
    nokori = m-shigotobi
    #kuwaeru
    for baito_index in range(len(baitos)):
        if baitos[baito_index][0] <= nokori:
            available_works.append(baitos[baito_index])
        else:
            baitos = baitos[baito_index:]
            break

    #itibanniiyatu
    max_now = 0
    max_index = None

    for work_index in range(len(available_works)):
        if available_works[work_index][1] >= max_now:
            max_index = work_index
            max_now = available_works[max_index][1]

    if max_index is not None:
        max += max_now
        available_works.pop(max_index)
        max_index = None

print(max)

Fixed submission:
from collections import defaultdict
from heapq import heappush, heappop
n, m = map(int, input().split())
baito_dict = defaultdict(list)
for _ in range(n):
    day, weight = map(int, input().split())
    baito_dict[day].append(weight)


max = 0

available_works = []

for day in range(1, m+1):
    for weight in baito_dict[day]:
        heappush(available_works, -weight)
    if available_works:
        max += heappop(available_works)

print(-max)
Buggy python submission (verdict: Runtime Error):
n = 7
a_list = list(map(int, input().split()))
false_count = 0
for index in range(a_list):
  if index + 1 != a_list[index]:
    false_count += 1
if false_count in [0, 2]:
  print("YES")
else:
  print("NO")

Fixed submission:
n = int(input())
a_list = list(map(int, input().split()))
false_count = 0
for index in range(len(a_list)):
  if index + 1 != a_list[index]:
    false_count += 1

if false_count in [0, 2]:
  print("YES")
else:
  print("NO")
Buggy python submission (verdict: Runtime Error):
print(3 * pow(int(input(), 2)))

Fixed submission:
print(3 * pow(int(input()), 2))
Buggy python submission (verdict: Runtime Error):
x, a = map(int, input().split()
if x < a:
    print(0)
else:
    print(10)

Fixed submission:
x, a = map(int, input().split())
if x < a:
    print(0)
else:
    print(10)

Buggy python submission (verdict: Runtime Error):
x, a = map(int, input().split)
if x < a:
    print(0)
else:
    print(10)

Fixed submission:
x, a = map(int, input().split())
if x < a:
    print(0)
else:
    print(10)
Buggy python submission (verdict: Runtime Error):
a = int(input().split()[0])
p = int(input().split()[1])

s = a * 3 + p
print(s // 2)

Fixed submission:
a = input().split()
an = int(a[0])
p = int(a[1])

s = an * 3 + p
print(s // 2)
Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
input1 = input()

door_num = int(input1.split()[1])
max_left = 1
min_right = int(input1.split()[0])

for i in range(door_num):
    a = input()
    new_inputs = [int(i) for i in a.split()]
    max_left = np.max([new_inputs[0], max_left])
    min_right = np.min([new_inputs[1], min_right])
    if not min_right >= max_left:
        break

if min_right >= max_left:
    print(min_right - max_left + 1)
else:
    print(0)

Fixed submission:
import numpy as np
input1 = input()

door_num = int(input1.split()[1])
lefts = []
rights = []
for i in range(door_num):
    a = input()
    new_inputs = [int(i) for i in a.split()]
    lefts.append(new_inputs[0])
    rights.append(new_inputs[1])
    #max_left = np.max([new_inputs[0], max_left])
    #min_right = np.min([new_inputs[1], min_right])
    #if not min_right >= max_left:
    #    break
min_right = np.min(rights)
max_left = np.max(lefts)

if min_right >= max_left:
    print(min_right - max_left + 1)
else:
    print(0)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
input1 = input()

door_num = int(input1.split()[1])
max_left = 1
min_right = int(input1.split()[0])

for i in range(door_num):
    a = input()
    new_inputs = [int(i) for i in a.split()]
    max_left = np.max([new_inputs[0], max_left])
    min_right = np.min([new_inputs[1], min_right])

if min_right >= max_left:
    print(min_right - max_left + 1)
else:
    print(0)

Fixed submission:
import numpy as np
input1 = input()

door_num = int(input1.split()[1])
lefts = []
rights = []
for i in range(door_num):
    a = input()
    new_inputs = [int(i) for i in a.split()]
    lefts.append(new_inputs[0])
    rights.append(new_inputs[1])
    #max_left = np.max([new_inputs[0], max_left])
    #min_right = np.min([new_inputs[1], min_right])
    #if not min_right >= max_left:
    #    break
min_right = np.min(rights)
max_left = np.max(lefts)

if min_right >= max_left:
    print(min_right - max_left + 1)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
import copy

s = input()

def value(s, adding_list):
    insert_index = []
    for index in range(len(adding_list)):
        if adding_list[index]:
            insert_index.append(index)

    if len(insert_index) == 0:
        return int(s)

    value_list = []

    for index in range(len(insert_index)):
        if index == 0:
            value_list.append(s[0:insert_index[index]+1])
        if index < len(insert_index)-1:
            value_list.append(s[(insert_index[index]+1) : insert_index[index+1]+1])

        if index == len(insert_index)-1:
            value_list.append(s[insert_index[index]+1:])

    ret_val = 0
    for value in value_list:
        ret_val += int(value)

    return ret_val

def dfs(adding_list, changing_index):
    print(changing_index)
    sum = 0
    if changing_index == len(s)-2:
        return value(s, adding_list)
    else:
        changing_index += 1
        new_adding_list = copy.copy(adding_list)
        sum += dfs(new_adding_list, changing_index)

        new_adding_list = copy.copy(adding_list)
        new_adding_list[changing_index] = True
        sum += dfs(new_adding_list, changing_index)
        return sum

def main():
    ret_val = 0
    plus_list = [False for _ in range(len(s)-1)]
    ret_val += dfs(plus_list, 0)

    plus_list = [False for _ in range(len(s)-1)]
    plus_list[0] = True
    ret_val += dfs(plus_list, 0)
    print(ret_val)

main()

Fixed submission:
import copy

s = input()

def value(s, adding_list):
    insert_index = []
    for index in range(len(adding_list)):
        if adding_list[index]:
            insert_index.append(index)

    if len(insert_index) == 0:
        return int(s)

    value_list = []

    for index in range(len(insert_index)):
        if index == 0:
            value_list.append(s[0:insert_index[index]+1])
        if index < len(insert_index)-1:
            value_list.append(s[(insert_index[index]+1) : insert_index[index+1]+1])

        if index == len(insert_index)-1:
            value_list.append(s[insert_index[index]+1:])

    ret_val = 0
    for value in value_list:
        ret_val += int(value)

    return ret_val

def dfs(adding_list, changing_index):
    sum = 0
    if changing_index == len(s)-2:
        return value(s, adding_list)
    else:
        changing_index += 1
        new_adding_list = copy.copy(adding_list)
        sum += dfs(new_adding_list, changing_index)

        new_adding_list = copy.copy(adding_list)
        new_adding_list[changing_index] = True
        sum += dfs(new_adding_list, changing_index)
        return sum

def main():
    if len(s) > 1:
        ret_val = 0
        plus_list = [False for _ in range(len(s)-1)]
        ret_val += dfs(plus_list, 0)

        plus_list = [False for _ in range(len(s)-1)]
        plus_list[0] = True
        ret_val += dfs(plus_list, 0)
        print(ret_val)
    else:
        print(s)

main()
Buggy python submission (verdict: Runtime Error):
a=int(input())
b=int(input())
c=int(input())
X=int(input())
counter=0
for i1 in range(a):
  for i2 in range(b):
    for i3 in range(c):
      if 500*i1+100*i2+50*i3==x:
        counter+=1
print(counter)

Fixed submission:
a=int(input())
b=int(input())
c=int(input())
x=int(input())
counter=0
for i1 in range(0,a+1):
  for i2 in range(0,b+1):
    for i3 in range(0,c+1):
      if 500*i1+100*i2+50*i3==x:
        counter=counter+1
print(counter)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
if a*b%2==0:
	print(Even")
else:
    print(Odd")

Fixed submission:
a,b=map(int,input().split())
if a*b%2==0:
	print("Even")
else:
    print("Odd")
Buggy python submission (verdict: Runtime Error):
n, k = map(int, input().split())
s = input()

temp = s[k].lower()
ans = s[0:k]+temp+s[k+1:]
print(ans)

Fixed submission:
n, k = map(int, input().split())
s = input()

temp = s[k-1].lower()
if k-1 != len(s):
    ans = s[0:k-1] + temp + s[k:]
else:
    ans = k[0:k-1] + temp
print(ans)
Buggy python submission (verdict: Runtime Error):
a,b,t = map(int, input().split())
ans=0
for i in range(1,t):
    if i%a ==0:
        ans = ans + b

print(ans)

Fixed submission:
a, b = map(int,input().split())

ans = 0

if b - a > 1:
    ans = b + (b-1)
elif b-a == 1:
    ans = a + b
elif b - a == 0:
    ans = a + b
else:
    ans = a + a- 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())

s = input()

cnt = []

for i in range(1,len(s)+1):
    temp = s[0:i]
    #print(temp)
    cnt.append(temp.count('AC'))

#print(cnt)
for i in range(q):
    l, r  = map(int, input().split())
    print(cnt[r - 1] - cnt[l - 1])

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

s = input()

cnt = [0]

for i in range(1,len(s)+1):
    temp = s[i-1:i+1]
    # print(temp)
    if temp == 'AC':
        cnt.append(cnt[i-1] + 1)
    else:
        cnt.append(cnt[i-1])

# print(cnt)
for i in range(q):
    l, r  = map(int, input().split())
    print(cnt[r - 1] - cnt[l - 1])

Buggy python submission (verdict: Time Limit Exceeded):
n, q = map(int, input().split())

s = input()

for i in range(q):
    l, r  = map(int, input().split())
    temp = s[l-1:r]
    print(temp.count('AC'))

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

s = input()

cnt = [0]

for i in range(1,len(s)+1):
    temp = s[i-1:i+1]
    # print(temp)
    if temp == 'AC':
        cnt.append(cnt[i-1] + 1)
    else:
        cnt.append(cnt[i-1])

# print(cnt)
for i in range(q):
    l, r  = map(int, input().split())
    print(cnt[r - 1] - cnt[l - 1])
Buggy python submission (verdict: Time Limit Exceeded):
s = input()
cnt = 0
while '10' in s:
    ind = s.find('10')
    temp = []
    temp.append(str(s[0:ind]))
    temp.append(str(s[ind + 2:len(s)]))
    #print(s)
    s = "".join(temp)
    cnt = cnt + 2

while '01' in s:
    ind = s.find('01')
    # print(ind)
    temp = []
    temp.append(str(s[0:ind]))
    temp.append(str(s[ind + 2:len(s)]))
    s = "".join(temp)
    #print(s)
    cnt = cnt + 2

print(cnt)

Fixed submission:
s = input()
cnt = 0

l = list(s)
a = l.count('0')
b = l.count('1')

# print(a)
# print(b)

print(min(a,b) * 2)
exit()
while '10' in s:
    ind = s.find('10')
    temp = []
    temp.append(str(s[0:ind]))
    temp.append(str(s[ind + 2:len(s)]))
    #print(s)
    s = "".join(temp)
    cnt = cnt + 2

while '01' in s:
    ind = s.find('01')
    # print(ind)
    temp = []
    temp.append(str(s[0:ind]))
    temp.append(str(s[ind + 2:len(s)]))
    s = "".join(temp)
    #print(s)
    cnt = cnt + 2

print(cnt)

Buggy python submission (verdict: Time Limit Exceeded):
s = input()
cnt = 0
while '10' in s:
    ind = s.find('10')
    s = str(s[0:ind]) + str(s[ind + 2:len(s)])
    #print(s)
    cnt = cnt + 2

while '01' in s:
    ind = s.find('01')
    # print(ind)
    s = str(s[0:ind]) + str(s[ind + 2:len(s)])
    #print(s)
    cnt = cnt + 2

print(cnt)

Fixed submission:
s = input()
cnt = 0

l = list(s)
a = l.count('0')
b = l.count('1')

# print(a)
# print(b)

print(min(a,b) * 2)
exit()
while '10' in s:
    ind = s.find('10')
    temp = []
    temp.append(str(s[0:ind]))
    temp.append(str(s[ind + 2:len(s)]))
    #print(s)
    s = "".join(temp)
    cnt = cnt + 2

while '01' in s:
    ind = s.find('01')
    # print(ind)
    temp = []
    temp.append(str(s[0:ind]))
    temp.append(str(s[ind + 2:len(s)]))
    s = "".join(temp)
    #print(s)
    cnt = cnt + 2

print(cnt)
Buggy python submission (verdict: Runtime Error):
import fractions
from functools import reduce

def gcd(numbers):
    return reduce(fractions.gcd, numbers, 1)

n = int(input())
print(gcd(list(map(int, input().split()))))

Fixed submission:
n, m = map(int, input().split())
temp = list(map(int, input().split()))
temp = set(temp[1:])
for i in range(n-1):
	temp2 = list(map(int, input().split()))
	temp2 = set(temp2[1:])
	temp = temp.intersection(temp2)
print(len(temp))

Buggy python submission (verdict: Runtime Error):
import fractions
from functools import reduce

def gcd(numbers):
    return reduce(fractions.gcd, numbers)

n = int(input())
print(gcd(list(map(int, input().split()))))

Fixed submission:
n, m = map(int, input().split())
temp = list(map(int, input().split()))
temp = set(temp[1:])
for i in range(n-1):
	temp2 = list(map(int, input().split()))
	temp2 = set(temp2[1:])
	temp = temp.intersection(temp2)
print(len(temp))
Buggy python submission (verdict: Time Limit Exceeded):
s = int(input())
l = [s]

for i in range(1, 1000000):
    n = l[i - 1]
    if n % 2 == 0:
        l.append(int(n / 2))
    else:
        l.append(int(3 * n + 1))

# print(l[:100])
for i, v in enumerate(l):
    for j in range(i + 1, len(l) - i):
        if l[j] == v:
            print(j + 1)
            exit()

Fixed submission:
s = int(input())
l = [s]

for i in range(1, 1000):
    n = l[i - 1]
    if n % 2 == 0:
        l.append(int(n / 2))
    else:
        l.append(int(3 * n + 1))

# print(l[:100])
for i, v in enumerate(l):
    for j in range(i + 1, len(l) - i):
        if l[j] == v:
            print(j + 1)
            exit()
Buggy python submission (verdict: Runtime Error):
from functools import reduce
from operator import add
n = int(input())

p = []

for i in range(n):
    p.append(int(input()))

sp = sorted(p, reverse=True)

sp[0] = int(sp[0] / 2)

print(reduce(add, sp))

Fixed submission:
d = int(input())

if d == 25:
    print('Christmas')
elif d == 24:
    print('Christmas Eve')
elif d == 23:
    print('Christmas Eve Eve')
elif d == 22:
    print('Christmas Eve Eve Eve')
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

l = list(range(a, b + 1))
ans = []
ans.extend(l[:min(k,len(l))])
ans.extend(l[max(0,len(l) - k):])

ans = sorted(list(set(ans)))
for a in ans:
   print(a)

Fixed submission:
a, b, k = map(int, input().split())

for i in range(a, min(b, a + k - 1) + 1):
    print(i)
for i in range(max(a + k, b - k + 1), b + 1):
    print(i)

exit()
l = list(range(a, b + 1))
ans = []
ans.extend(l[:min(k,len(l))])
ans.extend(l[max(0,len(l) - k):])

ans = sorted(list(set(ans)))
for a in ans:
   print(a)

Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

l = list(range(a, b + 1))
ans = []
ans.extend(l[:min(b,k)])
ans.extend(l[max(len(l) - k,a):])

ans = list(set(ans))
ans = sorted(ans)
for a in ans:
   print(a)

Fixed submission:
a, b, k = map(int, input().split())

for i in range(a, min(b, a + k - 1) + 1):
    print(i)
for i in range(max(a + k, b - k + 1), b + 1):
    print(i)

exit()
l = list(range(a, b + 1))
ans = []
ans.extend(l[:min(k,len(l))])
ans.extend(l[max(0,len(l) - k):])

ans = sorted(list(set(ans)))
for a in ans:
   print(a)

Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

l = list(range(a, b + 1))
ans = []
ans.extend(l[:k])
ans.extend(l[len(l) - k:])

ans = list(set(ans))
ans = sorted(ans)
for a in ans:
   print(a)

Fixed submission:
a, b, k = map(int, input().split())

for i in range(a, min(b, a + k - 1) + 1):
    print(i)
for i in range(max(a + k, b - k + 1), b + 1):
    print(i)

exit()
l = list(range(a, b + 1))
ans = []
ans.extend(l[:min(k,len(l))])
ans.extend(l[max(0,len(l) - k):])

ans = sorted(list(set(ans)))
for a in ans:
   print(a)

Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, input().split())

l = list(range(a, b + 1))
ans = []
ans.extend(l[:k])
ans.extend(l[len(l) - k:])

ans = sorted(list(set(ans)))
for a in ans:
   print(a)

Fixed submission:
a, b, k = map(int, input().split())

for i in range(a, min(b, a + k - 1) + 1):
    print(i)
for i in range(max(a + k, b - k + 1), b + 1):
    print(i)

exit()
l = list(range(a, b + 1))
ans = []
ans.extend(l[:min(k,len(l))])
ans.extend(l[max(0,len(l) - k):])

ans = sorted(list(set(ans)))
for a in ans:
   print(a)
Buggy python submission (verdict: Time Limit Exceeded):
N, K, Q = map(int, input().split())
li = [K]*N
for i in range(Q):
    a = int(input())
    li = list(map(lambda x: x-1, li))
    li[a-1] += 1

for i in range(N):
    if li[i] <= 0:
        print("No")
    else:
        print("Yes")

Fixed submission:
N, K, Q = map(int, input().split())
li = [K]*N
li = list(map(lambda x: x-Q, li))

for i in range(Q):
    a = int(input())
    li[a-1] += 1

for i in range(N):
    if li[i] <= 0:
        print("No")
    else:
        print("Yes")
Buggy python submission (verdict: Runtime Error):
A = int(input())
B = int(input())

if A % B == 0:
    print(B // A)
else:
    print(A // B + 1)

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

ans = 0
outlet = 1
while outlet < B:
    outlet -= 1
    outlet += A
    ans += 1
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
H = list(map(int, input().split()))

max_h = -1
for i in range(0, N):
    h = 0
    for j in range(i, N-1):
        if H[j] >= H[j+1]:
            h += 1
        else:
            break
    if h > max_h:
        max_h = h
print(max_h)

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

max_h = -1
h = 0
for i in range(0, N-1):
    if H[i] >= H[i+1]:
        h += 1
    else:
        if h > max_h:
            max_h = h
        h = 0
if h > max_h:
    max_h = h
print(max_h)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = tuple(map(int, input().split()))
for i in range(1, n+1):
    print(a.index(i)+1, end = ' ')


Fixed submission:
n = int(input())
a = tuple(map(int, input().split()))
b = dict((j,i + 1) for i, j in enumerate(a))
for i in sorted(a):
    print(b[i], end=' ')

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = *map(int, input().split()),
for i in range(1, n+1):
    print(a.index(i)+1, end = ' ')


Fixed submission:
n = int(input())
a = tuple(map(int, input().split()))
b = dict((j,i + 1) for i, j in enumerate(a))
for i in sorted(a):
    print(b[i], end=' ')
Buggy python submission (verdict: Runtime Error):
A,B = map(str, input().split())


# Ar = int(A[::-1])
A = int(A)
B = int(B)

# print(Ar)
# print(A)
# print(B)

count = 0
while A <= B:
  As = str(A)
  Ar = int(As[::-1])

  if A == Ar:
    # print("Yes")
    count+=1
  else:
    # print("No")
  A +=1

print(count)

Fixed submission:
A,B = map(str, input().split())


# Ar = int(A[::-1])
A = int(A)
B = int(B)

# print(Ar)
# print(A)
# print(B)

count = 0
while A <= B:
  As = str(A)
  Ar = int(As[::-1])

  if A == Ar:
    # print("Yes")
    count+=1
  A +=1

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

a = str(input())
b = str(input())

c = a + b
d = int(c)

print(d)

e = math.sqrt(d)
# e = int(e)

print(e)

if e.is_integer() == True:
  print("Yes")
else:
  print("No")


Fixed submission:
import math

a,b = map(str, input().split())

c = a + b
d = int(c)

e = math.sqrt(d)

if e.is_integer() == True:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
SA = list(input())
SB = list(input())
SC = list(input())

x = "a"

while True:
  if x == "a":
    if len(SA) ==0:
      print("A")
      exit()

    x = SA[0]
    SA.remove(x)
  
  elif x == "b":
    if len(SB) ==0:
      print("B")
      exit()

    x = SB[0]
    SB.remove(x)

  else:
    if len(SB) == 0:
      print("C")
      exit()
    
    x = SC[0]
    SC.remove(x)


Fixed submission:
SA = list(input())
SB = list(input())
SC = list(input())

x = "a"

while True:
  if x == "a":
    if len(SA) ==0:
      print("A")
      exit()

    x = SA[0]
    SA.remove(x)
  
  elif x == "b":
    if len(SB) ==0:
      print("B")
      exit()

    x = SB[0]
    SB.remove(x)

  else:
    if len(SC) == 0:
      print("C")
      exit()
    
    x = SC[0]
    SC.remove(x)
Buggy python submission (verdict: Runtime Error):
def main():
    N = int(input())
 
    if (N < 0 or N > 100):
            return 0
        array_len = len([N for i in range(1, N+1) if(i%2==1)])
        result = array_len / N
        return result
    
if __name__ == "__main__":
    main()

Fixed submission:
def main():
    n = int(input())
    print((n+n%2)/2/n)

    
if __name__ == "__main__":
    main()
Buggy python submission (verdict: Runtime Error):
n = int(input())
array = list(map(int, input().split()))
for i in range(n):
    map[array[i]] = str(i+1)
print(" ".join([map[i] for i in range(1, n+1)]))

Fixed submission:
n = int(input())
array = list(map(int, input().split()))
map = {}
for i in range(n):
    map[array[i]] = str(i+1)
list = []
for i in range(1, n+1):
    list.append(map[i])
print(" ".join(list))

Buggy python submission (verdict: Runtime Error):
n = map(int, input())
array = list(map(int, (input().split())))
map = {}
# make map to get table.
for i in range(n):
    map[array[i]] = i+1
# from 1 to n
list = []
for i in range(1, n+1):
    list.append(map[i])
print(list)

Fixed submission:
n = int(input())
array = list(map(int, input().split()))
map = {}
for i in range(n):
    map[array[i]] = str(i+1)
list = []
for i in range(1, n+1):
    list.append(map[i])
print(" ".join(list))

Buggy python submission (verdict: Runtime Error):
n = map(int, input())
array = list(map(int, input().split()))
map = {}
# make map to get table.
for i in range(n):
    map[array[i]] = i+1
# from 1 to n
list = []
for i in range(1, n+1):
    list.append(map[i])
print(list)

Fixed submission:
n = int(input())
array = list(map(int, input().split()))
map = {}
for i in range(n):
    map[array[i]] = str(i+1)
list = []
for i in range(1, n+1):
    list.append(map[i])
print(" ".join(list))

Buggy python submission (verdict: Runtime Error):
n = input()
array = map(int, input().split())
map = {}
# make map to get table.
for i in range(n):
    map[array[i]] = i+1
# from 1 to n
list = []
for i in range(1, n+1):
    list.append(map[i])
print(list)

Fixed submission:
n = int(input())
array = list(map(int, input().split()))
map = {}
for i in range(n):
    map[array[i]] = str(i+1)
list = []
for i in range(1, n+1):
    list.append(map[i])
print(" ".join(list))
Buggy python submission (verdict: Runtime Error):
n = int(input())
a_list = [int(i) for i in input().split()]
minus_count_even_flug = True
zero_exist_flug = False
  
for a in a_list:
    if a < 0:
        minus_count_even_flug = not minus_count_even_flug
    if a == 0:
        zero_exist_flug = True
     
a_abs_list = [abs(a) for a in a_list]
sum_a_abs_list = sum(a_abs_list)
if minus_count_even_flug or zero_exist_flug:
    print(sum_a_abs_list)
else:
    print(sum_a_abs_list - 2 * min(a_abs_list))

Fixed submission:
A, B, T = map(int, input().split())
print(int(T+0.5)//A * B)

Buggy python submission (verdict: Runtime Error):
A, B, T = map(int, input().split())
return ((T+0.5)//A * B)

Fixed submission:
A, B, T = map(int, input().split())
print(int(T+0.5)//A * B)
Buggy python submission (verdict: Runtime Error):
data = input()
a,b = data.split()
if(a==b):
  print(a+b)
elif(a>b):
  print(2*a-1)
else:
  print(2*b-1)

Fixed submission:
data = input()
a,b = data.split()
a = int(a)
b = int(b)
if(a==b):
  print(a+b)
elif(a>b):
  print(2*a-1)
else:
  print(2*b-1)