Just for kicks, I'm trying to solve them with semi-golfed Ruby. That is:
- As short as possible, but
- Have some whitespace to make them somewhat readable
- Avoid single-letter identifiers to keep them somewhat readable
- Don't make them too short when they are short enough
Each solution parses the input file and outputs the answer.