Buggy python submission (verdict: Runtime Error):
all = list(map(int, input().split()))

N = all[0]
Y = all[1]

yu = -1
hi = -1
no = -1
for i in range(N):
    for j in range(N-i):
        c = (N-(i+j))
        total = 10000*i + 5000*j + 1000*c
        if Y!=total:
            continue
        else:
            yu = i
            hi = j
            no = c
            check += 1
            break
    else:
        continue 
    break

print(yu)
print(" ")
print(hi)
print(" ")
print(no)
print(" ")


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

N = all[0]
Y = all[1]

yu = -1
hi = -1
no = -1
for i in range(N+1):
    for j in range((N+1)-i):
        c = (N-(i+j))
        total = 10000*i + 5000*j + 1000*c
        if Y==total:
            yu = i
            hi = j
            no = c
            break
        else:
            continue
    else:
        continue 
    break

print(str(yu) + " " + str(hi) + " " + str(no))

Buggy python submission (verdict: Runtime Error):
all = list(map(int, input().split()))

N = all[0]
Y = all[1]

check = 0
for i in range(N):
    j = 0
    for j in range(N-(i+j)):
        c = (N-(i+j))
        total = 10000*i + 5000*j + 1000*c
        if Y!=total:
            continue
        else:
            yu = i
            hi = j
            no = c
            check += 1
            break
    else:
        continue 
    break

if check==100:
    yu = -1
    hi = -1
    no = -1

print(yu)
print(" ")
print(hi)
print(" ")
print(no)
print(" ")


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

N = all[0]
Y = all[1]

yu = -1
hi = -1
no = -1
for i in range(N+1):
    for j in range((N+1)-i):
        c = (N-(i+j))
        total = 10000*i + 5000*j + 1000*c
        if Y==total:
            yu = i
            hi = j
            no = c
            break
        else:
            continue
    else:
        continue 
    break

print(str(yu) + " " + str(hi) + " " + str(no))

Buggy python submission (verdict: Runtime Error):
all = list(map(int, input().split()))

N = all[0]
Y = all[1]

check = 0
for i in range(N):
    for j in range(N-(i+j)):
        c = (N-(i+j))
        total = 10000*i + 5000*j + 1000*c
        if Y!=total:
            continue
        else:
            yu = i
            hi = j
            no = c
            check += 1
            break
    else:
        continue 
    break

if check==100:
    yu = -1
    hi = -1
    no = -1

print(yu)
print(" ")
print(hi)
print(" ")
print(no)
print(" ")


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

N = all[0]
Y = all[1]

yu = -1
hi = -1
no = -1
for i in range(N+1):
    for j in range((N+1)-i):
        c = (N-(i+j))
        total = 10000*i + 5000*j + 1000*c
        if Y==total:
            yu = i
            hi = j
            no = c
            break
        else:
            continue
    else:
        continue 
    break

print(str(yu) + " " + str(hi) + " " + str(no))

Buggy python submission (verdict: Runtime Error):
all = list(map(int, input().split()))

N = all[0]
Y = all[1]

check = 0
for i in range(N):
    for j in range(N-i):
        c = (N-(i+j))
        total = 10000*i + 5000*j + 1000*c
        if Y!=total:
            continue
        else:
            yu = i
            hi = j
            no = c
            check += 1
            break
    else:
        continue 
    break

if check==100:
    yu = -2
    hi = -1
    no = -1

print(yu)
print(" ")
print(hi)
print(" ")
print(no)
print(" ")


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

N = all[0]
Y = all[1]

yu = -1
hi = -1
no = -1
for i in range(N+1):
    for j in range((N+1)-i):
        c = (N-(i+j))
        total = 10000*i + 5000*j + 1000*c
        if Y==total:
            yu = i
            hi = j
            no = c
            break
        else:
            continue
    else:
        continue 
    break

print(str(yu) + " " + str(hi) + " " + str(no))

Buggy python submission (verdict: Runtime Error):
all = list(map(int, input().split()))

N = all[0]
Y = all[1]

for i in range(N):
    for j in range(N-i):
        if N!=i+j+abs(N-(i+j)):
            yu = -1
            hi = -1
            no = -1
            break
        else:
            total = 10000*i + 5000*j + 1000*(N-(i+j))
            if Y!=total:
                continue
            else:
                yu = i
                hi = j
                no = (N-(i+j))
    else:
        continue
    break

print(str(yu) + " " + str(hi) + " " + str(no))



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

N = all[0]
Y = all[1]

yu = -1
hi = -1
no = -1
for i in range(N+1):
    for j in range((N+1)-i):
        c = (N-(i+j))
        total = 10000*i + 5000*j + 1000*c
        if Y==total:
            yu = i
            hi = j
            no = c
            break
        else:
            continue
    else:
        continue 
    break

print(str(yu) + " " + str(hi) + " " + str(no))