Problem: I am trying to find the solution for below assignment: “Write a program to find the sum of following series 1^1+2^2+3^3”. So I am looking for someone who can give me the idea of a very efficient algorithm for large n (for example 10^10) to find a sum of the ... ++) t=((long long)t*i)%m; sum=(sum+t)%m; } printf("%d\n",sum); } Kindly help me in my above mentioned assignment.

asked
Jul 11
Raphael Pacheco
4.9k points