From 5fd612aadb2e38d6c2cedb0d4643d50a06c76a48 Mon Sep 17 00:00:00 2001 From: Tobias Eidelpes Date: Sat, 7 Dec 2019 13:05:09 +0100 Subject: [PATCH] Fix line spacing in README --- day2/README.md | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/day2/README.md b/day2/README.md index 3a10237..e1a7330 100644 --- a/day2/README.md +++ b/day2/README.md @@ -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 lines: -1,9,10,3, - -2,3,11,0, - -99, - +1,9,10,3, +2,3,11,0, +99, 30,40,50 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 3, so it overwrites itself. Afterward, the program looks like this: -1,9,10,70, - -2,3,11,0, - -99, - +1,9,10,70, +2,3,11,0, +99, 30,40,50 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 these produces 3500; this is stored at position 0: -3500,9,10,70, - -2,3,11,0, - -99, - +3500,9,10,70, +2,3,11,0, +99, 30,40,50 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 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 -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? \ No newline at end of file