problem 41 accepted