Programming, Source: Advent of Code

Recent posts (Page 19 of 22)

AoC 2016 Day 2: Pin Typer

Source: Bathroom Security

Part 1: Take a keypad with the following layout:

1 2 3
4 5 6
7 8 9

Using the instructions UDLR for Up, Down, Left, and Right respectively, move a ‘finger’ around over the keypad. At the end of each line of instructions, output the current digit.

read more...

Advent of Code: Day 23

Source

Part 1: Create a simple virtual machine with two registers (a and b, non-negative integers) and six instructions:

  • hlf (a|b) - divide the given register by half, round down
  • tpl (a|b) - triple the given register
  • inc (a|b) - add 1 to the given register
  • jmp [+-]\d+ - jump forward/backwards by the given number of instructions
  • jie (a|b), [+-]\d+ - if the given register is even, jump
  • jio (a|b), [+-]\d+ - if the given register equals one, jump

read more...


All posts