Sum of cubes recursion - finding the best sum of cubes
📁 Advanced Python Topics, AI
def sumOfCubes(n):if n == 0: retusumOfCubes(n - (int(n ** (1/3))) ** 3)print((int(n ** (1 / 3)) ** 3), end=' ')sumOfCubes(int(input()))Important! The problem must be solved using a recursive function.
The task is to represent a natural number as a sum of cubes of other natural numbers, and it should be
For working with time zones, Python developers themselves recommend using the module
Log in to leave an answer