Prepare for problem 10
Bruteforce problem 9
Solve problem 9 a little faster
Save some memory
Save some memory