Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Solution for year 32 of Human Resource Machine

This is a disgusting solution, but it works. The speed challenge wants you to take up to 393 steps (on average), this takes 81

If you know anyone that wrote code like this for a real problem, don't hire them.

-- HUMAN RESOURCE MACHINE PROGRAM --
BUMPUP 14
BUMPUP 14
BUMPUP 14
COPYTO 15
BUMPUP 14
COPYFROM [14]
COPYTO [15]
SUB [15]
COPYTO 15
COPYTO 17
BUMPUP 14
a:
INBOX
COPYTO 16
b:
SUB [15]
JUMPZ c
BUMPUP 15
COPYFROM 16
JUMP b
c:
COPYFROM 14
SUB 15
OUTBOX
COPYFROM 17
COPYTO 15
JUMP a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment