FASTPOW - Fast Power
You are asked to compute A^B (A to the power of B) (1 <= A,B <= 100 000 000). You surely understand that this number can be quite astonishing and i don't like big numbers unless they are on my paycheck so I'm just interested in the reminder of A^B mod C (1<= C <= 1000000)
Three integers A B and C.
Single integer - the result of the computation.
Input: 2 10 1000 Output: 24
First I used int ..it didn't work then i used unsigned long long int and it worked!!!
Last edit: 2015-07-25 20:45:43
John and the cows:
Last edit: 2013-08-12 04:26:40