Solution for Problem #19 (Brute-force)