I hereby claim:
- I am theglauber on github.
- I am theglauber (https://keybase.io/theglauber) on keybase.
- I have a public key whose fingerprint is C729 E690 1FE6 A6F1 6BCD 34AB 7318 BFCA 6EF0 9914
To claim this, I am signing this object:
#!python | |
""" | |
https://adventofcode.com/2019/day/9 | |
This starts again with the interpreter from day 5. | |
This runs both of the day 9 problems (after running the test data). | |
First: |
#! python | |
""" | |
https://adventofcode.com/2019/day/8 | |
""" | |
def chunker(seq, size): | |
return (seq[pos:pos + size] for pos in range(0, len(seq), size)) | |
test1:3,15,3,16,1002,16,10,16,1,16,15,15,4,15,99,0,0 | |
test2:3,23,3,24,1002,24,10,24,1002,23,-1,23,101,5,23,23,1,24,23,23,4,23,99,0,0 | |
test3:3,31,3,32,1002,32,10,32,1001,31,-2,31,1007,31,0,33,1002,33,7,33,1,33,31,31,1,32,31,31,4,31,99,0,0,0 | |
test1b:3,26,1001,26,-4,26,3,27,1002,27,2,27,1,27,26,27,4,27,1001,28,-1,28,1005,28,6,99,0,0,5 | |
test2b:3,52,1001,52,-5,52,3,53,1,52,56,54,1007,54,5,55,1005,55,26,1001,54,-5,54,1105,1,12,1,53,54,53,1008,54,0,55,1001,55,1,55,2,53,55,53,4,53,1001,56,-1,56,1005,56,6,99,0,0,0,0,10 | |
data:3,8,1001,8,10,8,105,1,0,0,21,38,55,72,93,118,199,280,361,442,99999,3,9,1001,9,2,9,1002,9,5,9,101,4,9,9,4,9,99,3,9,1002,9,3,9,1001,9,5,9,1002,9,4,9,4,9,99,3,9,101,4,9,9,1002,9,3,9,1001,9,4,9,4,9,99,3,9,1002,9,4,9,1001,9,4,9,102,5,9,9,1001,9,4,9,4,9,99,3,9,101,3,9,9,1002,9,3,9,1001,9,3,9,102,5,9,9,101,4,9,9,4,9,99,3,9,101,1,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,102,2,9,9,4,9,3,9,101,2,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,102,2,9,9,4,9,3,9,1001,9,1,9,4,9,3,9,102,2,9,9,4,9,3,9,102,2,9,9,4,9,3,9,1002,9,2,9,4,9,99,3,9,10 |
YQ2)CYG | |
63M)X4N | |
7YF)LRN | |
K2B)PVC | |
394)195 | |
W68)QNR | |
XDS)SX7 | |
JWG)789 | |
6RR)4R1 | |
S9Y)M1X |
#!python | |
""" | |
https://adventofcode.com/2019/day/5 | |
Opcodes: | |
------- | |
:: |
#! python | |
# https://adventofcode.com/2019/day/4 | |
min = 265275 | |
max = 781584 | |
counter = 0 | |
def check_pw(n): | |
""" |
#! python | |
# https://adventofcode.com/2019/day/3 | |
""" | |
Find intersection that's closest to source | |
------------------------------------------ | |
We use sets of tuples to store the path of each 'wire', | |
so we can use set intersection to find where they cross. | |
""" |
#!python | |
program = [ 1,0,0,3,1,1,2,3,1,3,4,3,1,5,0,3,2,13,1,19,1,19,10,23,2,10,23,27,1,27,6,31,1,13,31,35,1,13,35,39,1,39,10,43,2,43,13,47,1,47,9,51,2,51,13,55,1,5,55,59,2,59,9,63,1,13,63,67,2,13,67,71,1,71,5,75,2,75,13,79,1,79,6,83,1,83,5,87,2,87,6,91,1,5,91,95,1,95,13,99,2,99,6,103,1,5,103,107,1,107,9,111,2,6,111,115,1,5,115,119,1,119,2,123,1,6,123,0,99,2,14,0,0 ] | |
def chunker(seq, size): | |
return (seq[pos:pos + size] for pos in range(0, len(seq), size)) | |
# restore the "1202 error" |
#!/bin/perl | |
use strict; | |
use integer; | |
sub fuel { | |
my $mass = $_[0] + 0; | |
my $fuel = $mass / 3 - 2; | |
return $fuel; | |
} |
I hereby claim:
To claim this, I am signing this object: