Prob 0016 ‐ Power Digit Sum - maccergit/Euler GitHub Wiki

This is one of those problems where Python makes it so easy that it feels like cheating... Python's built in large number support, ease of conversion between strings and numbers, easy access of substrings, and generator comprehension syntax all work together to make this a trivial "one liner".

01

The direct approach runs in µsec time and scales linearly with the limit. The chief trick here is "use Python" :