Problem 36 (BRUTE FORCE; NOT OPTIMIZED)