brute force method solving euler 74