Solution for problem 13 (somewhat cheesy? using BigInteger namespace)