Avatar ·

使用递归的立方数数量 - 寻找最佳立方数数量

📁 python, 人工智能

   sumofcubes  ( n ):   if  n ==  0 :   retu  sumofcubes (n - ( int  (n ** ( 1 / 3 ))) **  3 )   print  (( int  (n ** ( 1 / 3 )) **  3 ), end =  '' ') sumofcubes ( int  ( input  ()))       

Important! The task should be solved by a recurrent function.

The task is to represent a natural number in the form of the sum of cubes of other natural numbers, and the smallest possible number of terms should be.

INTRODUCTION: 27 27 27 27 27 27 27 27 27 27