mercredi 25 mars 2015

How can i calculate this sum?

I am given a T and T numbers of n read as characters from a file from 0 to 10^100 and i need to calculate the last digit of the following sum: 1^1+2^2+3^3+..+n^n.

Can you help me solve it and explain me how can i read the numbers?

The time for the execution per test is 0.05 seconds.


5 1 1 5 2 2 3 8 4 3 5


Aucun commentaire:

Enregistrer un commentaire