Our FREE site is mostly funded by the Amazon ads ⇓below⇓.
Support us by clicking ⇑above⇑ next time you plan to buy a product on Amazon.
def maximum_digital_sum(a: int, b: int) -> int:
Considering natural numbers of the form, a**b, where a, b < 100,
what is the maximum digital sum?
# RETURN the MAXIMUM from the list of SUMs of the list of INT converted from STR of BASE raised to the POWER
sum([int(x) for x in str(base ** power)])
for base in range(a)
for power in range(b)
if __name__ == "__main__":