project euler problem 56 https projecteuler netproblem56 a googol 10100 is a massive number one followed by onehundred zeros 100100 is almost unimaginably large one followed by twohundred zeros despite their size the sum of the digits in each number is only 1 considering natural numbers of the form ab where a b 100 what is the maximum digital sum considering natural numbers of the form ab where a b 100 what is the maximum digital sum param a param b return solution10 10 45 solution100 100 972 solution100 200 1872 return the maximum from the list of sums of the list of int converted from str of base raised to the power tests considering natural numbers of the form a b where a b 100 what is the maximum digital sum param a param b return solution 10 10 45 solution 100 100 972 solution 100 200 1872 return the maximum from the list of sums of the list of int converted from str of base raised to the power tests
def solution(a: int = 100, b: int = 100) -> int:
    

    
    
    return max(
        sum(int(x) for x in str(base**power))
        for base in range(a)
        for power in range(b)
    )



if __name__ == "__main__":
    import doctest

    doctest.testmod()