Skip to content

Latest commit

 

History

History
15 lines (11 loc) · 399 Bytes

56. Powerful digit sum.md

File metadata and controls

15 lines (11 loc) · 399 Bytes

Question

Considering natural numbers of the form, eq, where a, b < 100, what is the maximum digital sum?

Solution

Another brute force.

def p56():
    return max(sum(int(c) for c in str(a ** b)) for a in range(1, 100) for b in range(1, 100))

Answer

972