solved problem 25 (mathematically and by brute force).