Solves problem 10 with inefficient algorithm. Going to try again with Sieve of Eratosthenes.