#! /usr/bin/env python3 """ pe48.py https://mind.kittttttan.info/py/pe48 """ def pe48(limit=1000): """ Find the last ten digits of 1**1 + 2**2 + ... + 1000**1000. """ s = 0 for i in range(1, limit+1): s += i**i print(s % (10**10)) if __name__ == "__main__": pe48()