WA on test #25.
Code for problem 73E.