Project Euler

Problem 48: Self powers

Find the last ten digits of the series, 1**1 + 2**2 + 3**3 + ... + 1000**1000. Run this solution at repl.io here.

      
        total = 0

        for n in range(1,1001):
          total += n**n

        #the last ten digits of the series
        print(str(total)[-10:])
      
    

back to code menu