Bangun tumpukan python kubus

def find_nb(m):
    total = 0
    n = 0
    
    while (total < m):
        n = n + 1
        total = total + n ** 3
        
    return n if total == m else -1
Talented Tuatara