Inefficient brute forcing solution to problem 10
Improved but still not great solution to 10