1. Unary Addition

The air in the natural philosophy study hall is thick with the smell of preserving agents and old paper. Your fellow student, Johann, a rather pompous Baltic German known for his loud complaints, slams his notebook shut.

„Reichenstein’s gone mad“, he grumbles. „He wants a full count of every leg from both beetle jars by morning. Two specimens are already missing labels, and I swear one of them has seven legs!“

He gestures toward the two glass jars. Inside, pinned to cork, dozens of insects lie in grim repose. A few have crude tally sheets tucked underneath: ||||| and ||||||||—markings scraped hastily with a student’s panic.

You peer closer. This isn’t about the beetles. It’s about trust. Reichenstein expects numbers he can verify—and woe betide the student who gives the wrong sum.

„Let me help“, you say, keeping your voice even. „I’ve been working on… a checking method.“

Johann snorts. „What, you’re going to recount each leg? With what, calipers?“

But you’re already copying the tallies onto your own slip of paper. Not to count them—but to test the Mill.

On the input tape, you'll get two positive numbers in the unary format separated by +. Your task is to compute the sum of these two numbers. For example, if the input tape is |||+||||, your output should be ||||||| (3 + 4 = 7).

Logic Mill specs

Sign in to submit your solution.