Solved problem 13 (BigInteger ftw :>)