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++: // Space Coconut Crab
#include <iostream>
using namespace std;
int count = 0; // ?¨???¬??¨ global ?????°
int solve(int E) {
  // ?????´????±???????
  // x+y*y+z*z*z=E
  int ans = E; // ?????§??? 
  for (int z=0; z*z*z<=E; ++z)
    for (int y=0; y*y<=E-z*z*z; ++y)
      for (int x=0; x<=E-y*y-z*z*z; ++x) {
        ++count;
        if (x+y*y+z*z*z == E)
          if (x+y+z < ans) // x+y+z??????????°??????????ans?????´??°
            ans = x+y+z;
      }
  return ans;
}
int main() {
  int E;
  while (cin >> E && E>0) {
    cout << solve(E) << endl; 
  }
}
// ?????´?????????????????¨?????????????????????????????? 10^11???...8?§???\?????????
// xy????±??????????z????±??????????????????????????????????

C++: #include <iostream>
#include <iomanip>
#include <cstdio>
#include <string>
#include <cstring>
#include <deque>
#include <list>
#include <queue>
#include <stack>
#include <vector>
#include <utility>
#include <algorithm>
#include <map>
#include <set>
#include <complex>
#include <cmath>
#include <limits>
#include <cfloat>
#include <climits>
#include <ctime>
#include <cassert>
#include <numeric>
#include <fstream>
#include <functional>
#include <bitset>
#define chmin(a, b) ((a)=min((a), (b)))
#define chmax(a, b) ((a)=max((a), (b)))
#define fs first
#define sc second
#define eb emplace_back
using namespace std;

typedef long long ll;
typedef pair<int, int> P;
typedef tuple<int, int, int> T;

const ll MOD=1e9+7;
const ll INF=1e18;
const double pi=acos(-1);
const double eps=1e-10;

int dx[]={1, 0, -1, 0};
int dy[]={0, -1, 0, 1};

int main(){
    while(1){
        int n; cin>>n;
        if(n == 0) return 0;

        ll ans=INF;
        for(ll z=0; z*z*z<=n; z++){
            for(ll y=0; y*y<=n; y++){
                ll x = n - z*z*z - y*y;

                if(0 <= x){
                    chmin(ans, x + y + z);
                }
            }
        }

        cout << ans << endl;
    }
}

C++:  #include <stdio.h>
   
   int e;
   
   int x, y, z;
   int m;
   
   int main(void)
   {
      while(1) {
          m = 1000000;
          y = 0;
          z = 0;
          scanf("%d", &e);
          if (e == 0) break;
          while (z * z * z <= e) {
              while (y * y <= e - z * z * z) {
                  x = e - y * y - z * z * z;
                  if (m > x + y + z) {
                      m = x + y + z;
                  }
                  y++;
              }
              y = 0;
              z++;
          }
          printf("%d\n", m);
      }
  }

C++: #include <iostream>
#include <algorithm>
using namespace std;
int e;

void solve() {
  int minm = 1000000;
  for (int z = 0; z*z*z <= e; z += 1) {
    for (int y = 0; y*y <= e-z*z*z; y += 1) {
      int x = e - z*z*z - y*y;
      if (x < 0) continue;
      int m = x + y + z;
      minm = min(minm, m);
    }
  }
  cout<<minm<<endl;
}

int main (int argc, char const* argv[]) {
  while (cin>>e, e) {
    solve();
  }
  return 0;
}

C++: #include<iostream>
#include<string>
#include<cstring>
#include<vector>
#include<set>
#include<cmath>
using namespace std;
typedef vector<int> vi;
set<string> cands;
int dy[]={-1,-1,-1,0,0,1,1,1};
int dx[]={-1,0,1,-1,1,-1,0,1};
int maxlength=0,h,w;
string ans="";

int z[105];
int y[1005];
void calc()
{
  for(int i=0;i<=100;i++)
    {
      z[i]=i*i*i;
    }
  for(int j=0;j<=1000;j++)
    {
      y[j]=j*j;
    }
}

int main()
{
  calc();
  while(1) 
    {
      int e;
      cin >> e;
      if(e==0) break;
      int ans=10000000;
      for(int i=0;i<=(int)sqrt(e);i++)
	{
	  int tmpe=e;
	  int tmpans=i;
	  tmpe-=i*i;
	  for(int j=100;j>=2;j--)
	    {
	      if(tmpe-z[j]>=0)
		{
		  tmpe-=z[j];
		  tmpans+=j;
		  break;
		}
	    }
	  tmpans+=tmpe;
	  ans=min(ans,tmpans);
	}
      cout << ans << endl;
    }
}

C++: #include <stdio.h>
int main(void)
{
  int e,m;
  int i,j,k;
  for(;;)
    {
      scanf("%d",&e);
      m=e+1;
      if(e==0){break;}
      for(i=0;i<=e;i++)
	{
	  /*printf("i=%d",i);*/
	  for(j=0;j<=e;j++)
	    {
	      for(k=0;k<=e;k++)
		{
		  /*printf("%d",k);*/
		  if(i+(j*j)+(k*k*k)==e && i+j+k<m)
		    {
		      m=i+j+k;
		      /*printf("m1=%d\n",m);*/
		    }
		}
	    }
	}
      printf("%d\n",m);
    }
  return 0;
}

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

using namespace std;

int main( void )
{
	int e;
	while(cin >> e, e) {
		bool hit = false;
		int answer = 1000001;
		for(int z=100; z > -1 && !hit; --z) {
			int sum_z = z * z * z;
			if(sum_z == e) { answer = z; break; }
			else if(sum_z > e) continue;
			else {
				int y = (int)sqrt((double)(e - sum_z));
				int sum_zy = sum_z + y * y;
				answer = min(answer, (z + y + e - sum_zy));
			}
		}
		cout << answer << endl;
	}
	return 0;
}

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

int main() {
    while(true) {
        long long e; cin >> e;
        if(e == 0) return 0;
        long long x, y, z;
        long long rst_min = 2000000000;
        for(y = 0; y * y <= e; y++) {
            for(z = 0; z * z * z <= e; z++) {
                x = e - y * y - z * z * z;
                if(x < 0) continue;
                if(x + y * y + z * z * z == e) {
                    rst_min = min(rst_min, x + y + z);
                }
            }
        }
        cout << rst_min << endl;
    }
}

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

int main()
{
	long e;
	while (cin >> e && e != 0)
	{
		long m = LONG_MAX;
		for (long x = 0; x < 1000000; x++)
		{
			for (long y = 0; y <= e - x; y++)
			{
				for (long z = 0; z <= e - x - (y * y); z++)
				{
					if (e == x + 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 max(int ,int );

int main(void){
  int e,min,zzz,ez,ezy,x=0;
  cin >> e;
 
  while(e!=0){
    min=e;
    zzz = pow(e,1.0/3.0);
    for(int z=0;z<=zzz;z++){
      ez = e -z*z*z;
      for(int y=0;y*y <= ez ;y++){
	x = ez - y*y;
	if(x+y+z<min) min = x+y+z;
	if(y>=min) y = e;
      }
      if(z>=min) z = e;
    }
      
    
    cout << min << endl;
    cin >> e;
  }
  return 0;
}

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

using namespace std;

#define INF 9999999
 
int main(){
    int e;
     
    while(cin >> e,e){
        //x+y^2+z^3=e
        int ans = INF;
         
        for(int z = 0 ; z*z*z <= e ; z++){
            for(int y = 0 ; (y*y)+(z*z*z) <= e ; y++){
                ans = min(ans,e-y*y-z*z*z+y+z);
            }
        }
        cout << ans << endl;
    }
    return 0;
}

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

using namespace std;

int main() {

  int e,x,y,z;

  for(;;){
    cin >> e;
    if(!e)break;
    int xm = e;
    int ym = (int)sqrt(e)+1;
    int zm = (int)cbrt(e)+1;

    int f,g,m=3*e;
    for(int i=zm;0<i;--i)
      for(int j=0;j<ym;++j)
	if(i*i*i+j*j<e)
	  for(int k=0;k<xm;++k){
	    f=k+j+i;
	    g=k+j*j+i*i*i;
	    if(g>e)
	      break;
	    if(e==g){
	      f=k+j+i;
	      if(f<m)
		m=f;
	    }
	  }
    cout << m << endl;
  }
  
}

C++: #include <iostream>

using namespace std;

int main(){
    int e;
    while(cin >> e, e){
        int m = e;
        for(int z=0; z*z*z<=e; ++z){
            int y = 1, n = e - z*z*z;
            for(; (y+1)*(y+1)<=n; ++y);
            int x = n - y*y;
            if(x+y+z < m)m = x+y+z;
        }
        cout << m << '\n';
    }
    return 0;
}