Skip to content

glitchbot

bradendubois edited this page Nov 24, 2021 · 9 revisions

GlitchBot

ID: glitchbot

Difficulty: 2.0

CPU Time: 1 second

Memory: 1024 MB

Solution

For this, take the list of instructions, and consider, for each instruction, the two other instructions possible. Simply build a subroutine that takes instructions and returns the resulting location, and find some way to replace one instruction with another. Try the first instruction, replacing it in two separate runs with the other two options, and if either end up at the correct location, output the index and replaced instruction, otherwise move on to the next.

Clone this wiki locally