solution for problem 58 w/brute force
solution for problem 58 w/brute force + timer