>Why fifth power of any digit is ended with this same digit
>also? According to Fermat's Little Theorem
ap ≡ a (mod p)
for any a not divisible by p, p a prime.
Well, 5 is a prime and, for any a, and for any p
ap - a is even,
so that, for any odd prime,
ap ≡ a (mod 2p)
or, in case of p = 5,
ap ≡ a (mod 10)
meaning, in part, that a and ap end with the same digit.
In the exceptional of a divisible by 5, its powers have the same last digit anyway.