Buggy python submission (verdict: Runtime Error):
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    for z in range(e):
        for y in range(e):
            x = e - y**2 - z**3 
            if x < 0:break
            if m > x+y+z: m = x+y+z
    print(m)
        


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    for z in range(e):
        for y in range(int(math.sqrt(e))):
            x = e - y**2 - z**3 
            if x < 0:break
            if m > x+y+z: m = x+y+z
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    for z in range(int(math.sqrt(e))):
        for y in range(int(math.sqrt(e))):
            x = e - y*y- z*z*z 
            if x < 0:break
            if m > x+y+z: m = x+y+z
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y =0
        while y**2 <= e - z**3:
            x = e - y**2- z**3 
            if x < 0:break
            if m > x+y+z: m = x+y+z
            y+=1
        z+=1
    print(m)
        


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y=0
        while y **2 <= e - z**3:
            x = e - y**2 - z**3 
            if m > x+y+z: m = x+y+z 
            y+=1
        z+=1
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import time
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    time.sleep(20)
    while z**3 <= e:
        y=0
        while y **2 <= e - z**3:
            x = e - y**2 - z**3 
            if m > x+y+z: m = x+y+z 
            y+=1
        z+=1
    
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
while 1:
    e = int(input())
    if not e :break
    m = e
    for z in range(e):
        for y in range(e):
            if  e-y**2-z**3+y+z < 0 or e - y**2 -z**3 <0:break
            if m > e-y**2-z**3+y+z: m =  e-y**2-z**3+y+z
    print(m)



Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
while 1:
    e = int(input())
    if not e :break
    m = e
    for z in range(e):
        for y in range(e):
            if  e-y**2-z**3+y+z < 0 or e - y**2 -z**3 <0:break
            if m > e-y**2-z**3+y+z: m =  e-y**2-z**3+y+z
    print(m)



Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import numpy
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(int(numpy.cbrt(e))+1):
        for y in range(int(numpy.sqrt(e) + 1)):
            if  e-y**2-z**3+y+z < 0 or e - y**2 -z**3 <0:break
            if m > e-y**2-z**3+y+z: m =  e-y**2-z**3+y+z
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import numpy
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(int(numpy.cbrt(e))+1):
        for y in range(int(numpy.sqrt(e) + 1)):
            if  e-y**2-z**3+y+z < 0 or e - y**2 -z**3 <0:break
            if m > e-y**2-z**3+y+z: m =  e-y**2-z**3+y+z
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(e):
        for y in range(int(math.sqrt(e))+ 1):
            if  e-y**2-z**3+y+z < 0 or e - y**2 -z**3 <0:break
            if m > e-y**2-z**3+y+z: m =  e-y**2-z**3+y+z
    print(m)



Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(e):
        for y in range(int(math.sqrt(e))+ 1):
            if  e-y**2-z**3+y+z < 0 or e - y**2 -z**3 <0:break
            if m > e-y**2-z**3+y+z: m =  e-y**2-z**3+y+z
    print(m)



Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(e):
        for y in range(int(math.sqrt(e))+ 1):
            if  e-y**2-z**3+y+z < 0 or e - y**2 -z**3 <0:break
            if m > e-y**2-z**3+y+z: m = e-y**2-z**3+y+z
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(int(math.sqrt(e)) + 1):
        for y in range(int(math.sqrt(e))+ 1):
            if  e-y**2-z**3+y+z < 0 or e - y**2 -z**3 <0:break
            if m > e-y**2-z**3+y+z: m = e-y**2-z**3+y+z
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(int(math.sqrt(e)) + 1):
        for y in range(int(math.sqrt(e))+ 1):
            if  e-y**2-z**3+y+z < 0 or e - y**2 -z**3 <0:break
            if m > e-y**2-z**3+y+z: m = e-y**2-z**3+y+z
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(int(math.sqrt(e)) + 1):
        for y in range(int(math.sqrt(e))+ 1):
            x = e - y**2-z**3
            if  x <0:break
            if m > x+y+z: m = x+y+z
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(int(math.sqrt(e)) + 1):
        for y in range(int(math.sqrt(e))+ 1):
            x = e - y**2-z**3
            if  x <0:break
            if m > x+y+z: m = x+y+z
    print(m)


Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)

Buggy python submission (verdict: Runtime Error):
import math
while 1:
    e = int(input())
    if  e == 0 :break
    m = e
    for z in range(int(math.sqrt(e)) + 1):
        for y in range(int(math.sqrt(e))+ 1):
            x = e - y**2-z**3
            if  x < 0:continue
            if m > x+y+z: m = x+y+z
    print(m)



Fixed submission:
import math
while 1:
    e = int(input().strip())
    if e ==0:break
    m=e
    z =0
    while z**3 <= e:
        y = int(math.sqrt(e-z**3))
        x = e - y**2- z**3 
        if x < 0:break
        if m > x+y+z: m = x+y+z    
        z+=1
    print(m)