summaryrefslogtreecommitdiff
path: root/Problem56.py
blob: f02667fa27fa50f95c9b2bfbc33868aaff100fe7 (plain)
1
2
3
4
5
6
7
8
9
10
11
maxsum = 0
for a in range(0,100):
    for b in range(0,100):
        count = 0
        temp = str(pow(a,b))
        for x in range(0,len(temp)):
                count += int(temp[x])
        if count > maxsum: maxsum = count
print(maxsum)