princeofsudan

Project Euler#48 Self powers

Mar 7th, 2013
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. #The series, 1**1 + 2**2 + 3**3 + ... + 10**10 = 10405071317.
  2.  
  3. #Find the last ten digits of the series, 1**1 + 2**2 + 3**3 + ... + 1000**1000.
  4.  
  5. count = 0
  6. for i in range(1,1001):
  7.     count += i**i
  8. print count
Advertisement
Add Comment
Please, Sign In to add comment