Jump to navigation
Jump to search
Instructions[edit]
Strategy[edit]
You get a new command, JUMP IF ZERO (abbreviated JUMPZ in the program listings.)
- JUMP IF ZERO
- This jump command works similarly to the original JUMP command. However, this command jumps conditionally. The program only jumps to a different instruction if, and only if, the value held in the worker's hands is zero. If it is, the program will follow the jump. If it's any value other than zero, the program will ignore the jump command, and continue on to the next command.
It may be the seventh year, but this job is almost exactly like the one from Year 2. The only difference is you must avoid placing zeros on the OUT belt. In order to do this, you will examine everything you pick up from the IN belt, and check if it's zero before going to the OUT belt. If it is a zero, you will ignore it (effectively throwing the value away) and move on to the next value.
a: b: INBOX JUMPZ b OUTBOX JUMP a
Optimizing[edit]
It is not possible to further optimize this solution.
Performance[edit]
Steps Size Speed Goal 4 23 Reached 4 23