Project Euler #48: Self powers

  • + 1 comment

    def Square_sum(n): MOD = 10**10

    total_sum = 0
    
    
    for i in range(1, n + 1):
    
        total_sum = (total_sum + pow(i, i, MOD)) % MOD
    
    return total_sum
    

    if name == 'main':

    N = int(input())
    
    
    print(Square_sum(N))