Code for problem 62B.
Code for problem 30E.