Fix line spacing in README
This commit is contained in:
parent
1617367464
commit
5fd612aadb
@ -44,12 +44,9 @@ For example, suppose you have the following program:
|
|||||||
For the purposes of illustration, here is the same program split into multiple
|
For the purposes of illustration, here is the same program split into multiple
|
||||||
lines:
|
lines:
|
||||||
|
|
||||||
1,9,10,3,
|
1,9,10,3,
|
||||||
|
2,3,11,0,
|
||||||
2,3,11,0,
|
99,
|
||||||
|
|
||||||
99,
|
|
||||||
|
|
||||||
30,40,50
|
30,40,50
|
||||||
|
|
||||||
The first four integers, 1,9,10,3, are at positions 0, 1, 2, and 3. Together,
|
The first four integers, 1,9,10,3, are at positions 0, 1, 2, and 3. Together,
|
||||||
@ -60,12 +57,9 @@ and position 10 contains 40. Add these numbers together to get 70. Then, store
|
|||||||
this value at the output position; here, the output position (3) is at position
|
this value at the output position; here, the output position (3) is at position
|
||||||
3, so it overwrites itself. Afterward, the program looks like this:
|
3, so it overwrites itself. Afterward, the program looks like this:
|
||||||
|
|
||||||
1,9,10,70,
|
1,9,10,70,
|
||||||
|
2,3,11,0,
|
||||||
2,3,11,0,
|
99,
|
||||||
|
|
||||||
99,
|
|
||||||
|
|
||||||
30,40,50
|
30,40,50
|
||||||
|
|
||||||
Step forward 4 positions to reach the next opcode, 2. This opcode works just
|
Step forward 4 positions to reach the next opcode, 2. This opcode works just
|
||||||
@ -73,12 +67,9 @@ like the previous, but it multiplies instead of adding. The inputs are at
|
|||||||
positions 3 and 11; these positions contain 70 and 50 respectively. Multiplying
|
positions 3 and 11; these positions contain 70 and 50 respectively. Multiplying
|
||||||
these produces 3500; this is stored at position 0:
|
these produces 3500; this is stored at position 0:
|
||||||
|
|
||||||
3500,9,10,70,
|
3500,9,10,70,
|
||||||
|
2,3,11,0,
|
||||||
2,3,11,0,
|
99,
|
||||||
|
|
||||||
99,
|
|
||||||
|
|
||||||
30,40,50
|
30,40,50
|
||||||
|
|
||||||
Stepping forward 4 more positions arrives at opcode 99, halting the program.
|
Stepping forward 4 more positions arrives at opcode 99, halting the program.
|
||||||
@ -94,4 +85,4 @@ Once you have a working computer, the first step is to restore the gravity
|
|||||||
assist program (your puzzle input) to the "1202 program alarm" state it had
|
assist program (your puzzle input) to the "1202 program alarm" state it had
|
||||||
just before the last computer caught fire. To do this, before running the
|
just before the last computer caught fire. To do this, before running the
|
||||||
program, replace position 1 with the value 12 and replace position 2 with the
|
program, replace position 1 with the value 12 and replace position 2 with the
|
||||||
value 2. What value is left at position 0 after the program halts?
|
value 2. What value is left at position 0 after the program halts?
|
||||||
Loading…
x
Reference in New Issue
Block a user