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.

  1. #!/usr/bin/python
  2.  
  3. max_sum = 0
  4. for a in range(90, 100):
  5.     for b in range(90, 100):
  6.         n = a**b
  7.         my_sum = sum(int(d) for d in str(a**b))
  8.         if my_sum > max_sum:
  9.             max_sum = my_sum
  10.  
  11. print max_sum