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 <bits/stdc++.h>
using namespace std;
int main(void){
int e;
int x,y,z;
int minm;
while(true){
cin>>e;
if(e==0)break;
minm=1000000;
for(int i=0;i<1001;i++){
	for(int j=0;j<101;j++){
		for(int k=0;k<101;k++){
			if(e==(i+j*j+k*k*k))minm=min(minm,i+j+k);
		}
	}
}
cout<<minm<<endl;
}
return 0;
}

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

int solve(int E){
    int ans = 1000000;
    int x;
    for (int y = 0; y*y <= E; ++y){
        for (int z = 0; z*z*z <= E; ++z){
            x = E - y*y - z*z*z;
            if (x >= 0)
                ans = min(ans, x+y+z);
        }
    }
    return ans;
}
    

int main(){
    int E;
    while (cin >> E && E>0) {
        cout << solve(E) << endl;
    }
}

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

int main() {
	int x, y, z, e, m;
	while (cin >> e && e > 0){
		m = 0;
		for (x = 0; x <= e; x++) {
			for (y = 0; y^2 <= e; y++) {
				int z = round(pow(e - x - y ^ 2, 1 / 3));
				if (x + y ^ 2 + z ^ 3 == e)
					m = min (m, x + y + z);
			}
		}
		cout << m << endl;
	}
}

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

int count = 0; // count the number of iterations
int solve(int E) {
  int ans = E;
  for (int y = 0; y*y <= E; ++y)
    for (int z = 0; z*z*z <= E; ++z){
      // ++count; // Minimum number of counts when the looping is minimized; loop y and z thus.
      int x = (int) round(E-y*y-z*z*z);
      if (x + y*y + z*z*z == E && x >= 0)
	ans = min(ans, x + y + z);
    }
return ans;
}
int main() {
  int E;
  while (cin >> E && E>0) {
    cout << solve(E) << endl;
  }
}

C++: #include <iostream>
#include <cmath>
using namespace std;
int calcOver(int, int);
int calcM(int, int ,int);

int main() {
  while(true) {
    int e;
    cin >> e;
    if(e == 0) break;
    int y = 0;
    int z = 0;
    int maxover = 0;
    int limity = pow(e, 1.0 / 2.0) + 1;
    int limitz = pow(e, 1.0 / 3.0) + 1;
    int maxy = limity;
    int maxz = limitz;
    int minm = e;
    bool flag = false;
    //cout << limity << ":" << limitz << endl;
    for(y = limity; y >= 0; --y) {
      for(int z = limitz; z >= 0; --z) {
        int m = calcM(e, y, z);
        if((y + z <= m) && (m <= y + z + e)) {
          //cout << y << ":" << z << ":" << ":" << m << endl;
          if(minm > m) {
            maxy = y;
            maxz = z;
            minm = m;
          }
        }
      }
    }
    //cout << maxy << ":" << maxz << endl;
    cout << (e - pow(maxy, 2) - pow(maxz, 3) + maxy + maxz) << endl;
  }
  return 0;
}

int calcOver(int y, int z) {
  return (pow(y, 2) + pow(z, 3));
}
int calcM(int e, int y, int z) {
  return (e - y*y - z*z*z + y + z);
}

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

int main(){
    int e;
    //x >= 0, y >= 0, z >= 0
    //x + y^2 + z^3 = e
    //find min(x + y + z)
    while(scanf("%d", &e) != EOF && e != 0){
        int min_v = 0x7fffffff;
        for(int z = 0; z * z * z <= e; z++){
            int y = sqrt(e - z * z * z), x = e - z * z * z - y * y;
            min_v = min(min_v, x + y + z);
        }
        printf("%d\n", min_v);
    }
    return 0;
}

C++: #include <iostream>
#define REP(i, a, n) for(int i = (a); i < (n); i++)
using namespace std;

int E;

int main(void) {
  while(cin >> E, E) {
    int ans = 100000000;
    REP(z, 0, 100) {
      int z3 = z * z * z;
      if(z3 > E) break;
      REP(y, 0, 1000) {
        int y2 = y * y;
        if(z3 + y2 > E) break;
        REP(x, 0, 1000000) {
          if(z3 + y2 + x > E) break;
          if(z3 + y2 + x == E) ans = min(ans, x + y + z);
        }
      }
    }
    cout << ans << endl;
  }
  return 0;
}

C++: #include <iostream>
#include <string>
#include <map>
#include <math.h>
#include <complex>

using namespace std;

int main(){

    int e;

    while(cin>>e,e){

        int x,y,z;
        int answer = 1000000;
        for(int i=0;i<=e;i++){
            for(int j=0;j<=sqrt(e)-i;j++){
                for(int k=0;k<=pow(e,1.0/3.0)-i+pow(j,2.0);k++){
                    if(i+pow(j,2.0)+pow(k,3.0)==e&&answer>i+j+k){
                        answer = i+j+k;
                    }
                }
            }
        }

        cout<<answer<<endl;
    }

    return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
    int e;
    while (cin >> e, e) {
        int mn = e;
        for (int z=0; z*z*z<=e; z++) {
            for (int y=0; y*y<=e-z*z*z; y++) {
                int x = e - z*z*z - y*y;
                mn = min(x+y+z,mn);
            }
        }
        cout << mn << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(void){
int e;
long long minm;
vector<vector<vector<int> > >nums(345,vector<vector<int> >(174,vector<int>(101)));
for(int i=0;i<345;i++){
	for(int j=0;j<174;j++){
		for(int k=0;k<101;k++){
			nums[i][j][k]=(i+j*j+k*k*k);
		}
	}
}
while(true){
cin>>e;
if(e==0)break;
minm=LLONG_MAX;
for(int i=0;i<150;i++){
	for(int j=0;j<174;j++){
		for(int k=0;k<101;k++){
			if(e==nums[i][j][k])minm=min(minm,(long long)i+j+k);
		}
	}
}
cout<<minm<<endl;
}
return 0;
}

C++: #include <iostream>
#include <math.h>
using namespace std;
int main(){
	//AOJ
	int x,sum;
	int e;
	while(1) {
		int max = 1000000;
		cin >>e ;
		if(e == 0) break;
		int e3 = (int)pow(e,1.0/3.0);
		int e2 = (int)sqrt((double)e);
		for(int i=0;i<=e3;i++){
			for(int j=0;j<=e2;j++){
				x = e-i*i*i-j*j;
				if (x >= 0){
				sum = x+i+j;
				if (sum<max) max =sum;
				}
			}
		}
		cout << max <<endl;
	}
		return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <queue>
#include <stack>
#include <map>
#include <vector>
#include <cstdio>
#include <cmath>
#include <cctype>
#define INF 1000000000
using namespace std;
bool debug=false;

int main(){
    int n;
    while(1){
        cin>>n;
        if(n==0)break;
        bool ok=false;
        long long ans=INF;
        for(int i=0;i<=1000;i++){
            for(int j=0;j<=1000;j++){
                for(int k=0;k<=100;k++){
                    if(i+j*j+k*k*k==n){
                        if(ans>i+j+k)ans=i+j+k;
                    }
                }
            }
        }
        cout<<ans<<endl;
    }
    return 0;
}

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

int main() {
  long long e;

  while (true) {
    cin >> e;
    if (e == 0) {
      break;
    }
    long long min = 999999999;
    for (int y = 0; y*y <= e; y++) {
      for (int z = 0; z*z*z <= e; z++) {
        long long x = e - y*y - z*z*z;
        if (x >= 0 && min > x + y + z) {
          min = x + y + z;
        }
      }
    }
    cout << min << endl;
  }

  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void)
{
    for(;;){
        int e;
        cin >> e;
        int m = 1<<26;
        if (e == 0){return 0;}
        for(int z = 0 ; z*z*z <= e ; z++){
            for(int y = 0 ; y*y + z*z*z <= e ; y++){
                int x = e - y*y - z*z*z;
                if(x + y + z < m){
                    m = x + y + z;
                }
            }
        }
        cout << m << endl;
    }
}

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

int main(){

  while(cin >> E){
    if ( E == 0) break;
    int min = 100000001; 
    for (int z = 0; z*z*z < E + 1; ++z){
      for (int y = 0; y*y < E - z*z*z + 1 ; ++y){
        int x = E - z*z*z - y*y;
        if( x + y + z < min ) min = x + y + z ;
      }
    }
    cout << min << endl;
  }
return 0;
}