Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import math
from scipy import optimize

def f1(sita,b,x):
    return b**2/8*math.sin(sita)*(3-math.cos(sita))-x


def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    
    if x==b*a**2:
        print(0)
    elif xx<a*b/2:
        ts=b**2/(xx)/2
        print(math.degrees(ans[0]))
        
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
        
if __name__ == "__main__":
    resolve()

Fixed submission:
import math

def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    
    if x==b*a**2:
        print(0)
    elif xx<a*b/2:
        ts=b**2/(xx)/2
        print(math.degrees(math.atan(ts)))
        
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
if __name__ == "__main__":
    resolve()

Buggy python submission (verdict: Runtime Error):
import math
from scipy import optimize


def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    
    if x==b*a**2:
        print(0)
    elif xx<a*b/2:
        ans = 90-optimize.fsolve(f1,math.pi/4,args=(b,xx),epsfcn=10**-18)
        print(math.degrees(ans[0]))
        
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
        
if __name__ == "__main__":
    resolve()

Fixed submission:
import math

def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    
    if x==b*a**2:
        print(0)
    elif xx<a*b/2:
        ts=b**2/(xx)/2
        print(math.degrees(math.atan(ts)))
        
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
if __name__ == "__main__":
    resolve()

Buggy python submission (verdict: Runtime Error):
import math
from scipy import optimize


def f1(sita,b,x):
    return b**2/4*math.sin(2*sita)*(math.sin(2*sita)**2 + 1)-x


def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    if xx<a*b/2:
        ans = optimize.fsolve(f1,math.pi/2,args=(b,xx),epsfcn=10**-8)
        print(math.degrees(ans[0]))
        pass
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
        pass

if __name__ == "__main__":
    resolve()

Fixed submission:
import math

def resolve():
    a,b,x=map(int,input().split())
    xx=x/a
    
    if x==b*a**2:
        print(0)
    elif xx<a*b/2:
        ts=b**2/(xx)/2
        print(math.degrees(math.atan(ts)))
        
    elif xx==a*b/2:
        print(45)
    else:
        ts=a**2/(a*b-xx)/2
        print(90-math.degrees(math.atan(ts)))
if __name__ == "__main__":
    resolve()
Buggy python submission (verdict: Runtime Error):
import sys
from io import StringIO
import unittest

class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)
    def test_入力例_1(self):
        input = """2"""
        output = """1"""
        self.assertIO(input, output)
    def test_入力例_2(self):
        input = """13"""
        output = """78"""
        self.assertIO(input, output)
    def test_入力例_3(self):
        input = """1"""
        output = """0"""
        self.assertIO(input, output)

if __name__ == "__main__":
    unittest.main()

Fixed submission:
n=int(input())

print(sum(range(n)))
Buggy python submission (verdict: Runtime Error):
import math
print(math.ceil(sum([int(i) for i in input.split()])/2))

Fixed submission:
import math
print(math.ceil(sum([int(i) for i in input().split()])/2))
Buggy python submission (verdict: Runtime Error):
x, y, z = int(input().split())
if y*z>=x:
  print("Yes")
else:
  print("No")

Fixed submission:
x, y, z = [int(a) for a in input().split()]
if y*z>=x:
  print("Yes")
else:
  print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0,n,2):
	if a[i]&1:
	ans += 1
print(ans)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0,n,2):
  if a[i]&1:
    ans+=1
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0,n,2):
if a[i] % 2 != 0:
ans += 1
print(ans)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0,n,2):
  if a[i]&1:
    ans+=1
print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0,n,2):
if a[i]&1:
ans += 1
print(ans)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(0,n,2):
  if a[i]&1:
    ans+=1
print(ans)
Buggy python submission (verdict: Runtime Error):
N=int(iput())
print(N%1000)

Fixed submission:
N = int(input())
if N%1000 == 0:
	print(0)
else:
	print((N//1000 + 1)*1000-N)
Buggy python submission (verdict: Runtime Error):
N = input()
N = int(N)
sum = 0
for i in range(N):
  sum+= (i+1)*(1+N//(i+1))(N//(i+1))/2
print(sum)

Fixed submission:
N = int(input())
sum = 0
for i in range(1,N+1):
  sum+=i*(1+N//i)*(N//i)/2
print(int(sum))

Buggy python submission (verdict: Runtime Error):
N = input()
N = int(N)
sum = 0
for i in range(N):
  sum+= (i+1)*(1+N//(i+1))(N//2)/2
print(sum)

Fixed submission:
N = int(input())
sum = 0
for i in range(1,N+1):
  sum+=i*(1+N//i)*(N//i)/2
print(int(sum))

Buggy python submission (verdict: Runtime Error):
N = int(input())
sum = 0
for i in range(N):
  sum+= i*(1+N//i)(N//2)/2
print(sum)

Fixed submission:
N = int(input())
sum = 0
for i in range(1,N+1):
  sum+=i*(1+N//i)*(N//i)/2
print(int(sum))

Buggy python submission (verdict: Runtime Error):
N = input()
sum = 0
for i in range(N):
  sum+= i*(1+N//i)(N//2)/2
print(sum)

Fixed submission:
N = int(input())
sum = 0
for i in range(1,N+1):
  sum+=i*(1+N//i)*(N//i)/2
print(int(sum))
Buggy python submission (verdict: Runtime Error):
a,b = int(input().split())
if a>=9 or b>=9:
  print(':(')
else:
  print('Yay!')

Fixed submission:
a,b = map(int, input().split())
if a>=9 or b>=9:
  print(':(')
else:
  print('Yay!')

Buggy python submission (verdict: Runtime Error):
a,b = map(int, intput().split())
if a>=9 or b>=9:
  print(':(')
else:
  print('Yay!')

Fixed submission:
a,b = map(int, input().split())
if a>=9 or b>=9:
  print(':(')
else:
  print('Yay!')

Buggy python submission (verdict: Runtime Error):
a,b = int(intput().split())
if a>=9 or b>=9:
  print(':(')
else:
  print('Yay!')

Fixed submission:
a,b = map(int, input().split())
if a>=9 or b>=9:
  print(':(')
else:
  print('Yay!')
Buggy python submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    s, w = map(int, rl().split())
    if ans = s > w :
        print('safe')
　　else:
　　    print('unsafe')
    

if __name__ == '__main__':
    solve()


Fixed submission:
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    s, w = map(int, rl().split())
    if s > w:
        print('safe')
    else:
      print('unsafe')
    

if __name__ == '__main__':
    solve()
Buggy python submission (verdict: Runtime Error):
import sys

sys.setrecursionlimit(10 ** 7)
rl = sys.stdin.readline


def solve():
    x, y, z = map(int, rl().sprit())
    print(z, x, y)
    

if __name__ == '__main__':
    solve()


Fixed submission:
import sys

sys.setrecursionlimit(10 ** 7)
r1 = sys.stdin.readline


def solve():
    x, y, z = map(int, r1().split())
    print(z, x, y)
    


if __name__ == '__main__':
    solve()
Buggy python submission (verdict: Runtime Error):
from fractions import math

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

print(a * b // math.gcd(a, b))

Fixed submission:
from fractions import gcd

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

print(a * b // gcd(a, b))

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

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

print(a * b // math.gcd(a, b))

Fixed submission:
from fractions import gcd

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

print(a * b // gcd(a, b))
Buggy python submission (verdict: Runtime Error):
from math import factorial
from itertools import permutations

n = int(input())
x, y = [0] * n, [0] * 
for i in range(n):
    x[i], y[i] = map(int, input().split())

dist_sum = 0
for route in permutations(range(n), n):
    for j in range(1, n):
        dist = (x[route[j]] - x[route[j - 1]]) ** 2
        dist += (y[route[j]] - y[route[j - 1]]) ** 2
        dist = dist ** 0.5
        dist_sum += dist
ans = dist_sum / factorial(n)
print(ans)


Fixed submission:
from math import factorial
from itertools import permutations

n = int(input())
x, y = [0] * n, [0] * n
for i in range(n):
    x[i], y[i] = map(int, input().split())

dist_sum = 0
for route in permutations(range(n), n):
    for j in range(1, n):
        dist = (x[route[j]] - x[route[j - 1]]) ** 2
        dist += (y[route[j]] - y[route[j - 1]]) ** 2
        dist = dist ** 0.5
        dist_sum += dist
ans = dist_sum / factorial(n)
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = list(map(int, input().split()))
if a >= 10 or b >= 10:
    print('-1')
else:
    print(a*b)


Fixed submission:
n = int(input())
for i in range(1, 10):
    if n % i == 0 and n // i < 10:
        print('Yes')
        exit()
print('No')
Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

ans = []
for i in range(len(s)-len(t)):
	count = 0
	for j in range(len(t)):
		if s[i+j] != t[j]:
			count += 1
	ans.append(count) 

print(min(ans))


Fixed submission:
s = input()
t = input()

ans = []
for i in range(len(s)-len(t)+1):
	count = 0
	for j in range(len(t)):
		if s[i+j] != t[j]:
			count += 1
	ans.append(count) 

print(min(ans))

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()

ans = []
for i in range(len(s)-len(t)):
	count = 0
	for j in range(len(t)):
		if s[i+j] != t[j]:
			count += 1
	ans.append(count) 

print(min(ans))


Fixed submission:
s = input()
t = input()

ans = []
for i in range(len(s)-len(t)+1):
	count = 0
	for j in range(len(t)):
		if s[i+j] != t[j]:
			count += 1
	ans.append(count) 

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

ans_sum = 0
for i in range(n):
	ans_sum += a[i] * sum(a[i+1:])
	
print(ans_sum%(10**9+7))


Fixed submission:
n = int(input())
a = list(map(int,input().split()))
mod = 10**9+7

S = sum(a) % mod
ans_sum = 0
for i in range(n-1):
	S -= a[i]
	ans_sum += a[i] * S
	
print(ans_sum%mod)

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

ans_sum = 0
for i in range(0,n-1):
        for j in range(i+1,n):
                ans_sum += a[i] * a[j]

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

Fixed submission:
n = int(input())
a = list(map(int,input().split()))
mod = 10**9+7

S = sum(a) % mod
ans_sum = 0
for i in range(n-1):
	S -= a[i]
	ans_sum += a[i] * S
	
print(ans_sum%mod)
Buggy python submission (verdict: Time Limit Exceeded):
n,k=map(int,input().split())
#0-indexed
p=[i-1 for i in list(map(int,input().split()))]
c=list(map(int,input().split()))
#1回以上K回以下
ansF=-1000000000000000000
for i in range(n):
    #すでに辿ったもの
    check=[False]*n
    #辿った順番
    turns=[]
    #今
    now=i
    while check[now]==False:
        check[now]=True
        turns.append(now)
        now=p[now]
    #答え(今の)
    ans=0
    #kのうち何回分
    #更新を毎回行う
    spare=turns.index(now)
    if spare>=k:
        for j in range(k):
            ans+=c[turns[j]]
            ansF=max(ans,ansF)
        continue
    for j in range(spare):
        ans+=c[turns[j]]
        ansF=max(ans,ansF)
    turns=turns[spare:]
    spare=k-spare
    #サイクルの長さ
    l=len(turns)
    #サイクルの和(あまりも)
    #サイクルどこで止めるか
    x=0
    for j in range(l):
        x+=c[turns[j]]
    #そもそもサイクル回らない場合
    if spare<=l:
        for j in range(spare):
            ans+=c[turns[j]]
            ansF=max(ans,ansF)
        continue
    #サイクル回した方が良い場合もある
    #最後のサイクルは回さない方が良いパターンも
    if x>=0:
        ans+=(x*(spare//l-1))
        ansF=max(ans,ansF)
        for j in range(l):
            ans+=c[turns[j]]
            ansF=max(ans,ansF)
        for j in range(spare%l):
            ans+=c[turns[j]]
            ansF=max(ans,ansF)
    #サイクル回さない方がいい場合
    else:
        for j in range(l):
            ans+=c[turns[j]]
            ansF=max(ans,ansF)
print(ansF)


Fixed submission:
N, K = map(int, input().split())
P = list(map(int, input().split()))
C = list(map(int, input().split()))

result = -float('inf')
for i in range(N):
    p = P[i] - 1
    c = C[p]
    k = K - 1
    t = c
    while p != i and k != 0:
        p = P[p] - 1
        c += C[p]
        t = max(t, c)
        k -= 1
    if k == 0 or c <= 0:
        result = max(result, t)
        continue
    l = K - k
    c = c * (K // l - 1)
    k = K - (K // l - 1) * l
    t = c
    while k != 0:
        p = P[p] - 1
        c += C[p]
        t = max(t, c)
        k -= 1
    result = max(result, t)
print(result)
Buggy python submission (verdict: Runtime Error):
import numpy as np

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

worker = list(np.zeros(n, dtype=int))

for i in range(n-1):
    worker[A[i]-1] += 1

for i in range(n):
    print(worker[i])


Fixed submission:
import numpy as np

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

worker = list(np.zeros(n, dtype=int))

for i in range(n-1):
    worker[A[i]-1] += 1

for i in range(n):
    print(worker[i])
Buggy python submission (verdict: Time Limit Exceeded):
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

K = int(input())

sum = 0

for a in range(1,K+1):
    for b in range(1,K+1):
        for c in range(1,K+1):
            sum += gcd(a,b,c)

print(sum)


Fixed submission:
import math
from functools import reduce

def gcd(*numbers):
    return reduce(math.gcd, numbers)

K = int(input())

sum = 0

for a in range(1,K+1):
    for b in range(a,K+1):
        for c in range(b,K+1):
            if a == b == c:
                sum += gcd(a,b,c)
            elif a == b or b == c:
                sum += gcd(a,b,c) * 3
            else:
                sum += gcd(a,b,c) * 6
print(sum)
Buggy python submission (verdict: Runtime Error):
import sys

A,B = map(float,input().split())

val_1 = A / 0.08
val_2 = B / 0.10

i = 1

if int(val_1) == int(val_2):
    print(int(val_1))
    sys.exit()
else:
    if val_1 > val_2:
        while val_1 != val_2:
            val_2 = (B + 0.1*i)/0.1
            i += 1
            if val_1 < val_2:
				print(-1)
				sys.exit()
		print(int(val_1))
	elif val_1 < val_2:
        while val_1 != val_2:
            val_1 = (A + 0.1*i)/0.1
            i += 1
            if val_1 > val_2:
                print(-1)
                sys.exit()
        print(int(val_1))

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

ans = -1

for i in range(10000,-1,-1):
    tax1 = int(i * 0.08)
    tax2 = int(i * 0.10)
    if tax1 == A and tax2 == B:
        ans = i

print(ans)

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

A,B = map(float,input().split())

val_1 = A / 0.08
val_2 = B / 0.10

i = 1

if int(val_1) == int(val_2):
    print(int(val_1))
    sys.exit()

else:
    while val_1 != val_2:
	val_2 = (B + 0.1*i)/0.1
	i += 1
	if val_1 < val_2:
            print(-1)
            sys.exit()

print(int(val_1))

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

ans = -1

for i in range(10000,-1,-1):
    tax1 = int(i * 0.08)
    tax2 = int(i * 0.10)
    if tax1 == A and tax2 == B:
        ans = i

print(ans)
Buggy python submission (verdict: Runtime Error):
bingo = []
for _ in range(3):
    bingo.append(list(map(int,input().split())))

cl = [[0,0,0],[0,0,0],[0,0,0]]

n = int(input())
st = set()
for _ in range(n):
    st.add(int(input()))

for _ in range(len(st)):
    for i in range(3):
        for j in range(3):
            if bingo[i][j] in st:
                cl[i][j] = 1

if sum(cl[0]) == 3 or sum(cl[1]) == 3 or sum(cl[2]) == 3:
    print('Yes')
elif sum(cl[:][0]) == 3 or sum(cl[:][1]) == 3 or sum(cl[:][2]) == 3:
    print('Yes')
elif cl[0][0]+cl[1][1]+cl[2][2] == 3 or cl[0][2]+cl[1][1]+cl[0][2] == 3:
    print('Yes')
else:
    print('No')

Fixed submission:
import sys

n,m = map(int, input().split())
num = [0]*n
count = [0]*n

for _ in range(m):
    b,c = map(int, input().split())
    if num[b-1] != c and count[b-1] > 0:
        print(-1)
        sys.exit()
    count[b-1]+=1
    num[b-1] = c    

if n == 3 and num[0] == 0 and count[0] == 0:
    num[0] = 1
elif n == 3 and num[0] == 0 and count[0]>0:
    print(-1)
    sys.exit()
elif n == 2 and num[0] == 0 and count[0] == 0:
    num[0] = 1
elif n == 2 and num[0] == 0 and count[0] >  0:
    print(-1)
    sys.exit()

ans = ""
for i in range(n):
    ans+=str(num[i])
print(ans)

Buggy python submission (verdict: Runtime Error):
bingo = []
for _ in range(3):
    bingo.append(list(map(int,input().split())))

cl = [[0,0,0],[0,0,0],[0,0,0]]

n = int(input())
st = set()
for _ in range(n):
    st.add(int(input()))

for _ in range(len(st)):
    for i in range(3):
        for j in range(3):
            if bingo[i][j] in st:
                cl[i][j] = 1

if sum(cl[0]) == 3 or sum(cl[1]) == 3 or sum(cl[2]) == 3:
    print('Yes')
elif sum(cl[:][0]) == 3 or sum(cl[:][1]) == 3 or sum(cl[:][2]) == 3:
    print('Yes')
elif cl[0][0]+cl[1][1]+cl[2][2] == 3 or cl[0][2]+cl[1][1]+cl[0][2] == 3:
    print('Yes')
else:
    print('No')

Fixed submission:
import sys

n,m = map(int, input().split())
num = [0]*n
count = [0]*n

for _ in range(m):
    b,c = map(int, input().split())
    if num[b-1] != c and count[b-1] > 0:
        print(-1)
        sys.exit()
    count[b-1]+=1
    num[b-1] = c    

if n == 3 and num[0] == 0 and count[0] == 0:
    num[0] = 1
elif n == 3 and num[0] == 0 and count[0]>0:
    print(-1)
    sys.exit()
elif n == 2 and num[0] == 0 and count[0] == 0:
    num[0] = 1
elif n == 2 and num[0] == 0 and count[0] >  0:
    print(-1)
    sys.exit()

ans = ""
for i in range(n):
    ans+=str(num[i])
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
from collections import Counter
n,m = map(int, input().split())

pen = 0
ac = 0
ques = []
ac_ques = set()

for _ in range(m):
    p,s = map(str, input().split())
    if p not in ac_ques:
        if s == "WA":
            ques.append(p)
        else:
            c = Counter(ques)
            pen += c[p]
            ac_ques.add(p)

print(len(ac_ques),pen)

Fixed submission:
import numpy as np
n,m = map(int, input().split())

ac_ques = np.array([0]*n)
count = np.array([0]*n)

for _ in range(m):
    p,s = map(str, input().split())
    if ac_ques[int(p)-1] == 0:
        if s == "WA":
            count[int(p)-1] += 1
        else:
            ac_ques[int(p)-1] = 1

print(sum(ac_ques),sum(ac_ques * count))
Buggy python submission (verdict: Runtime Error):
n = int(input())

def solve(num):
    cnt = 0
    for i in range(1,num+1):
        if num % i == 0:
            cnt += 1
    return cnt

ans = 0
for i in range(1,n+1):
    if i % 2 == 0:
        continue
    if solve(i) == 8:
        ans += 1

print(ans

Fixed submission:
n = int(input())

def solve(num):
    cnt = 0
    for i in range(1,num+1):
        if num % i == 0:
            cnt += 1
    return cnt

ans = 0
for i in range(1,n+1):
    if i % 2 == 0:
        continue
    if solve(i) == 8:
        ans += 1

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))
ans = 1
zf = 0
for i in range(n):
    if a[i] == 0:
        ans = 0
    ans = ans * a[i]
    if ans > 1000000000000000000:
        ans = -1
print(ans)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans = 1
for i in range(n):
    if a[i] == 0:
        ans = 0
    if ans != -1:
        ans = ans * a[i]
    if ans > 1000000000000000000:
        ans = -1
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, raw_input().split())
print max(a * b, a - b, a + b)

Fixed submission:
a, b = map(int, raw_input().split())
print max(a * b, a - b, a + b)
Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, raw_input().split())
list = []
for i in range(a, b+1):
	list += [i]
list.sort()
if (b - a + 1)/2 > k:
	for i in range(0, k):
		print list[i]
	for i in range(b-a-k+1,b-a+1):
		print list[i]
else :
	for i in range(0, b-a+1):
		print list[i]

Fixed submission:
a, b, k = map(int, raw_input().split())
if (b - a + 1)/2 >= k:
	for i in range(a, a + k):
		print i
	for i in range(b - k + 1,b + 1):
		print i
else :
	for i in range(a, b + 1):
		print i

Buggy python submission (verdict: Runtime Error):
a, b, k = map(int, raw_input().split())
list = []
for i in range(a, b+1):
	list += [i]
list.sort()
for i in range(0, k):
	print list[i]
for i in range(b-a-k+1,b-a+1):
	print list[i]

Fixed submission:
a, b, k = map(int, raw_input().split())
if (b - a + 1)/2 >= k:
	for i in range(a, a + k):
		print i
	for i in range(b - k + 1,b + 1):
		print i
else :
	for i in range(a, b + 1):
		print i
Buggy python submission (verdict: Runtime Error):
x = int(input())
print(int(not(x))

Fixed submission:
x = int(input())
print(1) if x == 0 else print(0)

Buggy python submission (verdict: Runtime Error):
print(int(not(input()))

Fixed submission:
x = int(input())
print(1) if x == 0 else print(0)

Buggy python submission (verdict: Runtime Error):
print(1) if x == 1 else print(0)

Fixed submission:
x = int(input())
print(1) if x == 0 else print(0)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())

a = 1
b = 1
for i in range(-1000, 1000):
  for j in range(-1000, 1000):
    if ((i ** 5) - (j ** 5) == n):
      a = i
      b = j

print("%d %d" %(a, b))

Fixed submission:
n = int(input())

a = 1
b = 1
for i in range(-200, 200):
  for j in range(-200, 200):
    if ((i ** 5) - (j ** 5) == n):
      a = i
      b = j

print("%d %d" %(a, b))
Buggy python submission (verdict: Time Limit Exceeded):
INF = 10**9
from heapq import heappop,heappush
H,W = (int(i) for i in input().split())
Ch,Cw = (int(i)-1 for i in input().split())
Dh,Dw = (int(i)-1 for i in input().split())
S = [input() for i in range(H)]

dist = [[INF]*W for _ in range(H)]
dist[Ch][Cw]= 0
que = [(0,Ch*W+Cw)]
while(que):
    u_dist,u = heappop(que)
    uh,uw = u//W,u%W
    if dist[uh][uw] < u_dist:
        continue
    for dh in range(-2,3):
        for dw in range(-2,3):
            nh = uh + dh
            nw = uw + dw
            if nh<0 or H <= nh or nw < 0 or W <= nw:
                continue
            if S[nh][nw]=="#":
                continue
            cost = 0 if abs(dh)+abs(dw)<=1 else 1
            if dist[nh][nw] > dist[uh][uw] + cost:
                dist[nh][nw] = dist[uh][uw] + cost
                heappush(que,(dist[nh][nw],nh*W+nw))
if dist[Dh][Dw] == INF:
    print(-1)
else:
    print(dist[Dh][Dw])

Fixed submission:
INF = 10**9
from heapq import heappop,heappush
H,W = (int(i) for i in input().split())
Ch,Cw = (int(i)-1 for i in input().split())
Dh,Dw = (int(i)-1 for i in input().split())
S = [input() for i in range(H)]

dist = [[INF]*W for _ in range(H)]
dist[Ch][Cw]= 0
que = [(0,Ch*W+Cw)]
while(que):
    u_dist,u = heappop(que)
    uh,uw = u//W,u%W
    if dist[uh][uw] < u_dist:
        continue
    for dh in range(-2,3):
        for dw in range(-2,3):
            nh = uh + dh
            nw = uw + dw
            if nh<0 or H <= nh or nw < 0 or W <= nw:
                continue
            if S[nh][nw]=="#":
                continue
            cost = 0 if abs(dh)+abs(dw)<=1 else 1
            if dist[nh][nw] > dist[uh][uw] + cost:
                dist[nh][nw] = dist[uh][uw] + cost
                heappush(que,(dist[nh][nw],nh*W+nw))
if dist[Dh][Dw] == INF:
    print(-1)
else:
    print(dist[Dh][Dw])