Project Euler Problem 56
I wrote a bunch of these but never posted them up, so I'm just uploading them in bulk now. Not much to say about them at this point.
- #!/usr/bin/python
- max_sum = 0
- for a in range(90, 100):
- for b in range(90, 100):
- n = a**b
- my_sum = sum(int(d) for d in str(a**b))
- if my_sum > max_sum:
- max_sum = my_sum
- print max_sum