Go: package main

import (
    "fmt"
    "math"
)

func main() {
    var e int
    for {
        fmt.Scan(&e)
        if e == 0 { break }

        var ans float64 = float64(e)
        for z := 0; z <= 101; z++ {
            for y := 0; y <= 1001; y++ {
                x := e - y*y - z*z*z
                if (0 <= x && x <= 100000) {
                  ans = math.Min(ans, float64(x+y+z));
                }
            }
        }
        fmt.Println(ans)
    }
}

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-

from math import sqrt

while True:
    e = int(input())
    if e == 0:
        break
    ans = 10**9
    for z in range(e):
        if z**3 > e:
            break
        y = int(sqrt(e-z**3))
        x = e - y ** 2 - z ** 3
        ans = min(ans,x+y+z)
    print(ans)

Python: Answer = []

while True:
    e = int(input())
    if e == 0:
        break

    m = e
    for z in range(int(e**(1/3)+1)):
        for y in range(int((e-z**3)**(1/2))+1):
            x = e-z**3-y**2
            m = min(m,x+y+z)
    Answer.append(m)

for i in range(len(Answer)):
    print(Answer[i])

Python: from math import floor

while True:
    e = int(input())
    if e == 0:
        break

    ans = 10 ** 10
    z = 0
    while z ** 3 <= e:
        y = floor((e - z **3) ** 0.5)
        x = e - y ** 2 - z ** 3
        ans = min(ans, x + y + z)
        z += 1
    print (ans)

Python: def ok(m,e):
    for x in range(m+1):
        for y in range(m+1-x):
            z = m-x-y
            if z < 0: break
            if x + y**2 + z**3 == e: return True
    return False

while True:
    E = int(input())
    if E == 0: break
    m = 1
    while not ok(m,E):
        m += 1
    print(m)

Python: import sys

inf = 1<<30

def solve():
    while 1:
        e = int(sys.stdin.readline().rstrip())

        if e == 0:
            return

        ans = inf

        z0 = int(e**(1/3))

        for z in range(max(0, z0 - 10), z0 + 10):
            if e - z**3 < 0:
                break

            y0 = int((e - z**3)**0.5)
            for y in range(max(0, y0 - 10), y0 + 10):
                x = e - z**3 - y**2

                if x < 0:
                    break

                ans = min(ans, x + y + z)
                
        print(ans)

if __name__ == '__main__':
    solve()

Python: while(1):
    e = int(input())
    if e == 0:
        break
    m = e
    for z in range(100):
        for y in range(1000):
            x = e - y * y - z * z * z
            if 0 > x:
                break
            if m > x + y + z:
                m = x + y + z
    print(m)

Python: 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)

Python: while 1:
    n=int(input())
    if not n:break
    a=n**(1/2)
    b=n**(1/3)
    if int(a)==a:
        print(int(a))
    elif int(b)==b:
        print(int(b))
    else:
        l=[]
        for z in range(int(b)+1):
            y=int((n-z**3)**(1/2))
            x=n-(y**2+z**3)
            l.extend([sum([x,y,z])])
        print(min(l))

Python: from math import sqrt

while True:
    e = int(input())
    if e == 0: break
    ans = e
    for z in range(e):
        if z ** 3 > e: break
        y = int(sqrt(e - z ** 3))
        x = e - (z ** 3 + y ** 2)
        ans = min(ans, x + y + z)
    print(ans)

Python: while True:
    e = int(input())
    if e == 0:
        break
    ans = float('inf')
    max_z = int(e ** (1 / 3))
    for z in range(max_z, -1, -1):
        y = int((e - z ** 3) ** 0.5)
        ans = min(ans, e - y ** 2 - z ** 3 + y + z)
    print(ans)

Python: # your code goes here
#grab
e=int(input())
#e=1250
while e>0:
    z=0
    while z**3<=e:
        z+=1
    z-=1
    f=z**3
    f=e-f
    y=0
 #   print(f)
    while y*y<=f:
        y+=1
    y-=1
    f-=y*y
    f+=y+z
   # print(f)
    y=0
    while y*y<=e:
        y+=1
    y-=1
    e-=y*y
    z=0
    while z**3<=e:
        z+=1
    z-=1
    e-=z**3
    e+=y+z
    if e<f:
        f=e
 #   print(y)
  #  print(z)
  #  print(e)
    print(f)
    e=int(input())
#    e=0

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-

while True:
    m = int(input())
    if m == 0:
        break
    ans = 10**9
    for i in range(int(m**(1/3))+1):
        if i**3 > m:
            continue
        y = int((m-i**3)**(1/2))
        x = m - y ** 2 - i ** 3
        ans = min(ans,x+y+i)
    print(ans)

Python: while True:
    e = int(input())
    if e == 0:
        break
    ans = float('inf')
    max_z = int(e ** (1 / 3))
    for z in range(max_z, -1, -1):
        y = int((e - z ** 3) ** 0.5)
        if y + z >= ans:
            break
        ans = min(ans, e - y ** 2 - z ** 3 + y + z)
    print(ans)

Python: import math
targ = int(input())
y,z = 0,0
while True:
    minans = float("inf")
    if (targ ** ( 1 / 3)) == int(targ ** ( 1 / 3)):
        z = int(targ ** ( 1 / 3))
        targ = 0
    elif (targ ** ( 1 / 2)) == int(targ ** ( 1 / 2)):
        y = int(targ ** ( 1 / 2))
        targ = 0
    else:
        for n in range(math.ceil(targ ** ( 1 / 3))):
            if minans == 0:
                break
            m = int(math.sqrt(targ - n**3))
            if (n ** 3) + (m **2) > targ:
                break
            if minans > targ - (n ** 3 + m**2) + n + m:
                minans = targ - (n ** 3 + m**2) + n + m
    if minans != float("inf"):
        print(minans)
    else:
        print(y + z)
    targ = int(input())
    if targ == 0:
        break

Python: #!/usr/bin/env python
# -*- coding: utf-8 -*-

from math import sqrt

while True:
    m = int(input())
    if m == 0:
        break
    ans = 10**9
    for i in range(int(m**(1/3))+1):
        y = int(sqrt(m-i**3))
        x = m - (y ** 2 + i ** 3)
        if y < 0 or x < 0:
            continue
        ans = min(ans,x+y+i)
    print(ans)

Python: while True:
    e = int(input())
    if e == 0:
        break
    z, ans = 0, float('inf')
    while z ** 3 <= e:
        r = e - z ** 3
        y = int(r ** 0.5)
        x = r - y ** 2
        ans = min(ans, x + y + z)
        z += 1
    print(ans)

Python: flg = True
while flg:
    e = int(input())
    if e == 0:
        break
    
    m = e + 1
    y = 0
    while y <= e:
        y2 = y ** 2
        if y2 > e:
            break
        z = 0
        while z <= e:
            z3 = z ** 3
            if z3 + y2 > e:
                break
            x = e - y2 - z3
            m = min(m, x + y + z)
            z += 1
        y += 1
    print(m)

Python: def main():
    while True:
        e = int(input())
        if e==0:
            return
        m = e
        z = int(e**(1/3))
        while z >= 0:
            y = int(int(e-z**3)**(1/2))
            while y >= 0:
                x = e - z**3 - y**2
                m = min(m, x+y+z)
            y -= 1
        z -= 1
        print(m)

if __name__ == '__main__':
    main()

Python: from math import floor
while(True):
  e = int(input())
  if e == 0:
    quit()
  ans = e
  for i in range(0,e):
      if i ** 3 > e:
          break
      j = floor((e - i ** 3)**0.5)
      k = e - i ** 3 - j ** 2 + i + j
      if k < ans:
          ans = k
  print(ans)