problem 142, second submit

 got "Time Limit Exceeded on test 7"