Fast Exponentiation: Modular Power Algorithm
Computing 3^13 by multiplying 3 thirteen times works fine. Computing 2^1000000007 the same way? Your program will run until the heat death of the universe.
Read more →Computing 3^13 by multiplying 3 thirteen times works fine. Computing 2^1000000007 the same way? Your program will run until the heat death of the universe.
Read more →