Self powers
The series, 11 + 22 + 33 + ... + 1010 = 10405071317.
Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000.
Find the last ten digits of the series, 11 + 22 + 33 + ... + 10001000.
A very simple program. I think there is no need for explaining anything in this program.
Program
As always you can download the source code from Github Gist pep48.py
Output
Summary
I don't have any words to talk about this problem. A direct and simple solution. I think even a very beginner of python can write a very fast and optimized solution. As you can see the program executes in less time and I am satisfied with the solution. One can think in mathematical point of view to improve the performance.
As always you can comment in the comment box below, if you have any doubt or didn't understand anything. I will be glad to help you.
Please do comment in the comment box, if you have found any typo or have a better program or different program. Please do comment if you have any suggestion. I will be very happy to view each of them.
You can also contact me.
Thank you. Have a nice day😃!