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>

using namespace std;

int main()
{
    while (true) {
        int e;
        cin >> e;
        if (e == 0) {
            return 0;
        }
        auto r = [e] {
            for (int m = 0; true; ++m) {
                for (int i = 0; i < m; ++i) {
                    for (int j = 0; j < m - i + 1; ++j) {
                        for (int k = 0; k < m - i - j + 1; ++k) {
                            if (i + j * j + k * k * k == e) {
                                return m;
                            }
                        }
                    }
                }
            }
        }();
        cout << r << endl;
    }
}

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 = 9999999;
		FOR(y,0,sqrt(e)+1){
			FOR(z,0,cbrt(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>
#include <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <string>
#include <algorithm>
#include <cmath>

using namespace std;

int main (int argc, char *argv[]) {
    int e;
    while (cin>>e, e) {
        int m = 1000000000;
        for (int x = 0; x <= e; ++x) {
            for (int y = 0; pow(y, 2) <= e; ++y) {
                for (int z = 0; pow(z, 3) <= e; ++z) {
                    if (x + pow(y, 2) + pow(z, 3) == e) {
                        m = min(m, x + y + z);
                    }
                }
            }
        }
        cout<<m<<endl;
    }
    return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int x,y,z;
int e;
int solve(){
	int minnum;
	z=  (int)(pow (e,1/3));
	y = (int)(sqrt(e - pow(z, 3)));
	x = (int)(e - pow(z, 3)-pow(y, 2)); 
	mininum = x+y+z;
	return mininum;
};
int main(){
	int A[100000];
    int k = 0;
	while( cin>>e && e>0 )
	{
		A[k]=solve();
        k++;
	}
	for(int l = 0;l < k; l++)
    {
        cout<<A[l]<<endl;
    }
	return 0;
}

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

using namespace std;

int main()
{
	int e;

	while (scanf("%d", &e), e){
		int min = INT_MAX;

		for (int i = 0; i < 100; i++){
			for (int j = 0; j < 100; j++){
				for (int k = 0; k < 100; k++){
					if (e == i + j * j + k * k * k){
						if (min > i + j + k){
							min = i + j + k;
						}
					}
				}
			}
		}

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

	return (0);
}

C++: #include<stdio.h>
#include<math.h>
int main(){


int E;
while(1){
scanf("%d",&E);if(E==0)break;
int min=E;int m=E,max=0;
int i=1;int y=0,z=0;
for(int j=0;j<=sqrt((double)(E));j++){
	
for(int k=0;k<=pow((double)(E-j*j)+1,1.0/3.0);k++)
{i=E-j*j-k*k*k;//printf("%d %d %d\n",i,j,k*k*k);
	if(i+j*j+k*k*k>E)break;
	if(i>=0&&i+j*j+k*k*k==E&&i+j+k<min){min=i+j+k;max=j*j+k*k*k;y=j;z=k;}
}}
i=E-y*y-z*z*z;
m=i+y+z;
printf("%d\n",min);
}
return 0;
}

C++: #include <cstdio>
#include <utility>
#include <cmath>
#include <algorithm>
using namespace std;

#define gcu getchar_unlocked
int in(int c){int n=0;bool m=false;if(c=='-')m=true,c=gcu();
	do{n=10*n+(c-'0'),c=gcu();}while(c>='0');return m?-n:n;}
int in() {return in(gcu());}
bool scan(int &n){int c=gcu();return c==EOF?false:(n=in(c),true);}
bool scan(char &c){c=gcu();gcu();return c!=EOF;}
//bool scan(string &s){int c;s="";
//	for(;;){c=gcu();if(c=='\n'||c==' ')return true;else if(c==EOF)return false;s+=c;}}
#define pcu putchar_unlocked
#define vo inline void out
template <typename T>
vo(T n){static char buf[20];char *p=buf;
	if(n<0)pcu('-'),n*=-1;if(!n)*p++='0';else while(n)*p++=n%10+'0',n/=10;
	while (p!=buf)pcu(*--p);}
vo(const char *s){while(*s)pcu(*s++);}
vo(char c){pcu(c);}
//vo(string &s){for (char c: s) pcu(c);}
template <typename head, typename... tail> vo(head&& h, tail&&... t){out(h);out(move(t)...);}
//template <typename T> vo(vector<T> &v){for(T &x:v)out(&x == &v[0]?"":" "),out(x);out('\n');}
#undef vo

int main() {
	for (int e, m; (e = m = in());) {
		for (int z = cbrt(e) + 0.00001; z >= 0; z--) {
			int te = e - z * z * z;
			int y = (int)sqrt(te);
			int tm = z + y + te - y * y;
			if (y > m)
				break;
			m = min(m, tm);
		}
		out(m, '\n');
	}
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cmath>
#include <vector>
#include <utility>
#include <cstring>
using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)
typedef long long ll;

int main() {
	int e;
	while(cin >> e, e) {
		int res = e;
		for(int z=0; z*z*z<=e; z++) {
			int ze = e - z*z*z;
			int y = floor(sqrt(ze));
			ze -= y*y;
			res = min(res, z+y+ze);
		}

		cout << res << endl;
	}
	return 0;
}

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

int main(){
  int E;
  cin >> E;
  int sum;
  for(int z=100;z>=0;z--){
    if(E-z*z*z>0){
      int t=E-z*z*z;
      int y=(int)sqrt(t);
      int x=t-y*y;
      sum=x+y+z;
      break;
    }
  }
  cout << sum;
}

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

int main(){
  int e;

  while(cin>>e,e){
    if(e==1) cout << e << endl;
    else{
      int x=e,y=pow((double)e,1.0/2.0),z=pow((double)e,1.0/3.0),m=1000001;
      for(int i=0;i<=x;i++){
        for(int j=0;j<=y;j++){
          for(int k=0;k<=z;k++){
            if(i+pow((double)j, 2.0)+pow((double)k, 3.0)==e&&m>i+j+k){
              m=i+j+k;
            }
          }
        }
      }
      cout << m << endl;
    }
  }

  return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define shosu(n) setprecision(n)
using namespace std;
int main() {
  long long e, t;
  while (cin >> e, e) {
    long long ans = 1000000000;
    for (int i = e; i > 0; i--) {
      for (int j = e; j > 0; j--) {
        t = e - i * i - j * j * j;
        if ((i + j + t) == e) {
          ans = min(ans, i + j + t);
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;

int main(){
	int e;
	while(cin>>e and e>0){
		int ans=10000000;
		for(int i=0;i*i*i<=e;i++){
			for(int j=0;j*j<=e-i*i*i;j++){
				int m=i+j+e-(i*i*i+j*j);
				if(ans>m) ans=m;
			}
		}
		cout<<ans<<endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
/*
int pow(int a,int b){
    int R=1;
    while(b){
        if(b&1) R=(R*a);
        a=(a*a);
        b>>=1;
    }
    return R;
}
*/
int main(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	int e;
	while(cin >> e , e){
		int m=1e+9;
		for(int z=0 , z1=0 ; z<=e; ++z1 , z=z1*z1*z1){
			for(int y=0 , y1=0 ; y<=e; ++y1 , y=y1*y1){
				int x=e-y-z;
				if(x>=0) m = min(m , x+(int)sqrt(y)+(int)cbrt(z));
			}
		}
		cout << m << endl;
	}
	return 0;
}