3 ms·
pow(x,e,mod) was the reason I switched from Perl to Python :)
by Perepiska 2y ago
pow(x,e,mod) was the reason I switched from Perl to Python :)
- archgoon 2y agoEven better, they implement negative exponents as well, so you don't have to find a library or cobble together an extended gcd function, since you get in inverses for free.