Solution for Problem #32 (Brute-force)