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)
    }
}

C++: #include<iostream>
#include<math.h>
using namespace std;

int main(void){
	long e,x,y,z,m,temp;

	while(1){
		cin >> e;
		if(e==0)break;
		
		m=e;
		for(z=0; z*z*z<=e; ++z){
			for(y=0; y*y+z*z*z<=e; ++y){
				x = e-(y*y)-(z*z*z);
				m = min(m,x+y+z);
			}
		}

		cout << m << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cmath>
using namespace std;

int main(){
    int n;
    while(cin >> n, n){
        int ans = 1<<30;
        for(int i=0; i < 100; i++){
            int j = sqrt(n - i*i*i);
            if(n < i*i*i + j*j) continue;
            ans = min(ans, i+j+(n-i*i*i-j*j));
        }
        cout << ans << endl;
    }
}

C++: #include <iostream>
#include <math.h>

using namespace std;

int main(){
	bool first;
	int min;
	int x, y, z, e,buf_z,buf_y;
	while (cin >> e){
		first = true;
		for (z = 0; (buf_z = pow(z, 3)) <= e; z++)
		{
			for (y = 0; buf_z + (buf_y = pow(y, 2)) <= e; y++)
			{
				x = e - buf_z - buf_y;
				if (first == true)
				{
					min = x + y + z;				
					first = false;
				}
				else if (min > x + y + z)
				{
					min = x + y + z;
				}
			}
		}
		cout << min << "\n";
	}
	return 0;
}

C++: #include<bits/stdc++.h>
#include<algorithm>
using namespace std;

int main(){
  int x,y,z,minm=100000000,e;
  while(true){
    minm=1000000;
    cin>>e;
    if(e==0)break;
    for(z=0; z<100; z++){
      for(y=0; y<1000; y++){
	x = e-y*y-z*z*z;
	if(x>=0) minm = min(minm,x+y+z);
      }
    }
    cout<<minm<<endl;
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>
using namespace std;

#define ll long long
#define vvi vector< vector<int> >
#define vi vector<int>
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back
#define pii pair<int,int>
#define mp make_pair
#define pi 3.14159265359
#define shosu(X) fixed << setprecision(X)
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}

int main(){
	const int intmax  = 1000010;
	ll int e;
	while(cin >> e,e){
		ll int ans = intmax;
		FOR(y,0,sqrt((double)e)+1){
			FOR(z,0,cbrt((double)e)+1){
				if(e-y*y-z*z*z>=0) ans = min(ans,y+z+(e-y*y-z*z*z));
			}
		}
		cout << ans << endl;
	}
	
}

C++: #include <iostream>

using namespace std;

int main() {
	int e,x,y,z,small ;
	x=0;
	y=0;
	z=0;
	small=10000000;
	while(cin >> e && e>0){
		while(z*z*z < 1000000){
			y = 0 ;
			while(y*y < 1000000){
				x = e-y*y-z*z*z;
				if (small > x+y+z){
				small = x+y+z;
				}
			y = y+1;
			}
		z = z+1;
		}
	cout << small << endl ;
	}
}

C++: #include <iostream>

using namespace std;

int main() {
	int e,x,y,z,small ;
	x=0;
	y=0;
	z=0;
	small=10000000;
	while(cin >> e && e>0){
		while(z*z*z <= 1000000){
			y = 0 ;
			while(y*y <= 1000000){
				x = e-y*y-z*z*z;
				if (small > x+y+z){
				small = x+y+z;
				}
			y = y+1;
			}
		z = z+1;
		}
	cout << small << endl ;
	}
}

C++: #include <bits/stdc++.h>
using namespace std;

int e;

int main() {
  while (1) {
    scanf("%d", &e);
    if (e == 0) return 0;

    int ans = e;
    for (int z=0; z*z*z<=e; z++) {
      int z3 = z*z*z;
      for (int y=0; y*y+z3<=e; y++) {
        int y2 = y*y;
        for (int x=0; x+y2+z3<=e; x++) {
          if (x+y2+z3 == e) ans = min(ans, x+y+z);
        }
      }
    }

    printf("%d\n", ans);
  }
}

C++: #include <cmath>
#include <iostream>

int main()
{
    int x, e;
    int y_max, z_max = 0;
    int sum_min;

    while (std::cin >> e && e > 0) {
        y_max = static_cast<int>(std::sqrt(e));
        z_max = static_cast<int>(std::cbrt(e));
        sum_min = e + y_max + z_max;
        for (int i = 0; i <= y_max; i++) {
            for (int j = 0; j <= z_max; j++) {
                x = e - std::pow(i, 2) - std::pow(j, 3);
                if (x >= 0 && x + i + j < sum_min) {
                    sum_min = x + i + j;
                }
            }
        }
        std::cout << sum_min << '\n';
        sum_min = e + y_max + z_max;
    }
    return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

int main() {

    int e;

    while(cin >> e, e) {

        int x, y, z, m = 1 << 24;

        int z_range = floor(pow(e, 1.0 / 3));
        for(z = 0; z <= z_range; ++z) {
            int y_range = floor(sqrt(e - z * z * z));
            for(y = 0; y <= y_range; ++y) {
                m = min(m, (e - y * y - z * z * z) + y + z);
            }
        }

        cout << m << endl;

    }

}

C++: #include <cstdio>
const int inf = 1e9;

int main()
{
    int e;
    
    while (scanf("%d", &e), e) {
        int mi = inf;

        for (int z = 0; z * z * z <= e; ++z) {
            for (int y = 0; y * y <= e - z * z * z; ++y) {
                mi = min(mi, e - z * z * z - y * y + y + z);
            }
        }

        printf("%d\n", mi);
    }
}

C++: #include<bits/stdc++.h>
using namespace std;

int main(){
    int e;
    while(cin >> e, e != 0){
        int m = e;
        for(int z=0;z<=100;++z){
            for(int y=0;y<=1000;++y){
                int x = e - (z*z*z + y*y);
                if(x >= 0){
                    m = min(m, x+y+z);
                }
            }
        }
        cout << m << endl;
    }

    return 0;
}

C++: #include <iostream>
#include <cmath>

using namespace std;

int main() {
	int hyou[101];
	for (int i = 0; i < 101; i++) {
		hyou[i] = i*i*i;
	}
	int e;
	while (cin >> e) {
		if (e == 0) {
			break;
		}
		int a, b, c;
		for (int i = 1; ;i++) {
			if (hyou[i] > e) {
				c = i-1;
				break;
			}
		}
		for (int i = 1; ;i++) {
			if (i*i > e-hyou[c]) {
				b = i-1;
				break;
			}
		}
		for (int i = 1; ;i++) {
			if (i > e-hyou[c]-b*b) {
				a = i-1;
				break;
			}
		}
		int MIN = a+b+c;
		for (int i = 0; ;i++) {
			if (i >= MIN) {
				break;
			}
			for (int j = 0; ;j++) {
				if (i+j >= MIN) {
					break;
				}
				for (int k = 0; k <= c; k++) {
					if (i+j*j+hyou[k] == e) {
						MIN = min(MIN, i+j+k);
					} else if (i+j*j+hyou[k] > e) {
						break;
					}
				}
			}
		}
		cout << MIN << endl;
	}
	return 0;
}