Problem 7 solution - bruteforce, not nice