Project Euler #171: Finding numbers for which the sum of the squares of the digits is a square

  • + 0 comments

    Not so easy task. It can be solved using clever dynamic programming, focusing on digit by digit processing. Search space should be defined by the maximum value of square digit sum. For given square digit sum we also need to keep track of its frequency. Maximum time is around 50 ms for values of k in the order of 10^100.