Skip to content

Instantly share code, notes, and snippets.

@garethlewin
Created January 3, 2016 05:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save garethlewin/8d34b00b38c3be5b0afe to your computer and use it in GitHub Desktop.
Save garethlewin/8d34b00b38c3be5b0afe to your computer and use it in GitHub Desktop.
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