More code jam

Not a very code-heavy day, more thinking required. I was overthinking it
at first - it's a very simple approach. I'm having an overflow on the
large sample, though. Gonna have to address that tomorrow.