Hm. Long hiatus since the last round; had to deal with some real life for a few weeks, I guess, but I’m getting back into it. I’m guessing with the condo sale and apartment move and everything else, though, it may be a while until I finish this book, let alone this chapter. 10127 looks to be a bit sticky, but I’m probably missing something obvious.
10035 – Primary Arithmetic
This problem wasn’t too exciting, especially when the solution is spelled out in the previous pages. I didn’t put any particular effort into the solution, which is okay since no particular effort seemed to be needed.
10018 – Reverse and Add
Uh. Yeah. Here’s the solution. Enjoy?
701 – The Archeologist’s Dilemma
The solution is perhaps my shortest submission. This is all the more embarassing because those few lines of code probably took me eight hours to write. First, I built up a solution that looked similar, but was sprintfing out the first min(ndigits,11) characters and doing a strcmp. Then I figured out how to reduce this to some math. Then I realized I could reduce it to a range query, but still kept doing the range query. Eventually figured out that I could bypass the query, and just look for divergence under whole exponents. I’m not proud of how long it took me to get to that point, but I guess I’m pleased with the result.