#P1679. 神奇的四次方数
神奇的四次方数
Description
Decompose an integer into a sum of fourth powers, with being as small as possible. For example, when , since , we have . It can be proven that in this case is minimal.
Input Format
One line, an integer .
Output Format
One line, an integer .
706
2
Hint
Constraints
- For of the testdata, .
- For of the testdata, .
Translated by ChatGPT 5
京公网安备 11011102002149号