Have you got access to a basic number theory book?
I'm having trouble with this :
I want to write an algorithm that computes the K first and K last digits of n^n.
I know I should use some sort of combination between (a+b)^n and log(n) but I'm really striking out !
Thank you in advance for your help!