solved problem 10 w/ brute force, waiting on elegant solution