luogu#P1660. 数位平方和
数位平方和
Problem Description
Define as the sum of the -th powers of the digits of .
Define as the maximum value satisfying .
Compute .
Input Format
One line with three integers .
Output Format
One integer, equal to .
2 1 5
14
Hint
For of the testdata, . For of the testdata, , .
Translated by ChatGPT 5