I took that opportunity to learn a bit of assembly. I’m guessing it was 100 lines of code, COM size was ~100 bytes and it could do the whole test in less than 100ms. I got second place to a turbo pascal entry that had a much larger binary, took 5-10 seconds but it was maybe ten lines of very readable code.
Made me realize that folks really value readability (and to ask how metrics are weighted )
e: Autocorrect did the worst thing you could do to Barth's name.
You can mitigate the unreadability in many ways. For example c++ allows to generate magic numbers using constexpress, where the code itself is clear and human readable.
You can create a loop to calculate a lookup table and store it into a small number of uint64. The code shows what the magic numbers mean, and can be debugged.
Incidentally, in my experience, the strongest human competition usually is in Python.
Always do as much as possible at compile time, unless it bloats your binary size or makes things slower with cache misses.