Hi,

I java, under BigInteger class, there is a function called modpow, http://java.sun.com/j2se/1.4.2/docs/api/java/math/BigInteger.html#modPow%28java.math.BigInteger,%20java.math.BigInteger%29

It allows us to answer things like 99999^9999 % 78 very quickly. But I am unable to find one for c++.

Thanks