Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys
import itertools
import math
from collections import Counter, defaultdict

class Main(object):
    
    def __init__(self):
        pass

    def solve(self):
        '''
        insert your code
        '''
        while True:
            e = input()
            if e == 0:
                break
            m = float('inf')
            for z in range(101):
                for y in range(1001):
                    x = e - z ** 3 - y ** 2
                    if x >= 0:
                        m = min(m, x + y + z)
            print m
        return None

if __name__ == '__main__':
    m = Main()
    m.solve()

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

import os
import sys
import itertools
import math
from collections import Counter, defaultdict

class Main(object):
    
    def __init__(self):
        pass

    def solve(self):
        '''
        insert your code
        '''
        while True:
            e = input()
            if e == 0:
                break
            m = float('inf')
            for z in range(101):
                tmp = e - z ** 3
                if tmp < 0:
                    continue
                y = int(math.sqrt(tmp))
                x = e - y ** 2 - z ** 3
                m = min(m, x + y + z)
            print m
        return None

if __name__ == '__main__':
    m = Main()
    m.solve()

Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys
import itertools
import math
from collections import Counter, defaultdict

class Main(object):
    
    def __init__(self):
        pass

    def solve(self):
        '''
        insert your code
        '''
        while True:
            e = input()
            if e == 0:
                break
            m = float('inf')
            for z in range(101):
                for y in range(1001):
                    x = e - z ** 3 - y ** 2
                    if x >= 0:
                        m = min(m, x + y + z)
            print m
        return None

if __name__ == '__main__':
    m = Main()
    m.solve()

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

import os
import sys
import itertools
import math
from collections import Counter, defaultdict

class Main(object):
    
    def __init__(self):
        pass

    def solve(self):
        '''
        insert your code
        '''
        while True:
            e = input()
            if e == 0:
                break
            m = float('inf')
            for z in range(101):
                tmp = e - z ** 3
                if tmp < 0:
                    continue
                y = int(math.sqrt(tmp))
                x = e - y ** 2 - z ** 3
                m = min(m, x + y + z)
            print m
        return None

if __name__ == '__main__':
    m = Main()
    m.solve()

Buggy python submission (verdict: Runtime Error):
#! /usr/bin/env python
# -*- coding: utf-8 -*-

import os
import sys
import itertools
import math
from collections import Counter, defaultdict

class Main(object):
    
    def __init__(self):
        pass

    def solve(self):
        '''
        insert your code
        '''
        while True:
            e = input()
            if e == 0:
                break
            m = float('inf')
            for z in range(101):
                tmp = e - z ** 3
                if tmp < 0:
                    continue
                for y in range(1001):
                    x = e - z ** 3 - y ** 2
                    if x >= 0:
                        m = min(m, x + y + z)
                    else:
                        break
            print m
        return None

if __name__ == '__main__':
    m = Main()
    m.solve()

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

import os
import sys
import itertools
import math
from collections import Counter, defaultdict

class Main(object):
    
    def __init__(self):
        pass

    def solve(self):
        '''
        insert your code
        '''
        while True:
            e = input()
            if e == 0:
                break
            m = float('inf')
            for z in range(101):
                tmp = e - z ** 3
                if tmp < 0:
                    continue
                y = int(math.sqrt(tmp))
                x = e - y ** 2 - z ** 3
                m = min(m, x + y + z)
            print m
        return None

if __name__ == '__main__':
    m = Main()
    m.solve()