Code for problem 370A.
Code for problem 370B.
Initial version - WA on test #4.
Code for problem 41D.