Code for problem 41B.
Code for problem 55B.