Solved problem 23
I should code a better way rather than brute force, but I wanted to get this done quick