Buggy python submission (verdict: Runtime Error):
import statistics  import median
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Fixed submission:
import statistics  
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy python submission (verdict: Runtime Error):
from statistics import median

n = int(input())
a = [int(i) for i in input().split()]

b = int(median([v-i for i, v in enumerate(a, 1)]))
res = 0
for i, v in enumerate(a, 1):
    res += abs(v-(b+i))

print(res)


Fixed submission:
import statistics  
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy python submission (verdict: Runtime Error):
from statistics import median

n = int(input())
a = [int(i) for i in input().split()]

b = int(median([v-i for i, v in enumerate(a, 1)]))
res = 0
print(b)
for i, v in enumerate(a, 1):
    res += abs(v-(b+i))

print(res)

Fixed submission:
import statistics  
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy python submission (verdict: Runtime Error):
import statistics  
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Fixed submission:
import statistics  
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy python submission (verdict: Runtime Error):
import statistics  import median
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Fixed submission:
import statistics  
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy python submission (verdict: Runtime Error):
import statistics  import median
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = round(median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Fixed submission:
import statistics  
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Buggy python submission (verdict: Runtime Error):
import statistics
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = round(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)

Fixed submission:
import statistics  
N = int(input())
A=list(map(int, input().split()))
B=[]
for number, i in enumerate(A, 1):
    B.append(i-number)
median = int(statistics.median(B))
ans2 = 0
for i in B:
    ans2 += abs(i-median)
print(ans2)