Add more solutions

This commit is contained in:
Kevin Keogh
2019-02-03 14:21:43 -05:00
parent 4ef32a7e04
commit fbebd6c05f
7 changed files with 147 additions and 0 deletions

12
problem-56.py Normal file
View File

@@ -0,0 +1,12 @@
MAX_NUM = 100
if __name__ == '__main__':
maximum = 0
for a in range(MAX_NUM):
for b in range(MAX_NUM):
num = a ** b
total = sum(int(x) for x in list(str(num)))
if total > maximum:
maximum = total
print(maximum)