<garvit244>279_1.py
def numSquares( n):
    mapping = {}
    squares = [num*num for num in range(1, int(pow(n, 0.5)) + 1)]
    for square in squares:
        mapping[square] = 1
    
    for val in range(1, n+1):
        if val not in mapping:
            mapping[val] = float('inf')
            for square in squares:
                if square < val:
                    mapping[val] = min(mapping[val], mapping[square] + mapping[val-square])
    return mapping[n]
def sample_funcname ( var_0 ) :
    var_1 = { }
    var_8 = [ var_2 * var_2 for var_2 in range ( 1 , int ( pow ( var_0 , 0.5 ) ) + 1 ) ]
    for var_9 in var_8 :
        var_1 [ var_9 ] = 1
    for var_10 in range ( 1 , var_0 + 1 ) :
        if var_10 not in var_1 :
            var_1 [ var_10 ] = float ( 'inf' )
            for var_9 in var_8 :
                if var_9 < var_10 :
                    var_1 [ var_10 ] = min ( var_1 [ var_10 ] , var_1 [ var_9 ] + var_1 [ var_10 - var_9 ] )
    return var_1 [ var_0 ]
