Java BigInteger, tricky input/output
Math, primes, Java BigInteger modPow method
TLE
Graph, flood fill
SE
Math, factorization
Math, primes, tricky problem
Math, primes