def main(): code = load_int_list("input/d05.txt") inp = [1] output = [] compute(copy.copy(code), inp=inp, output=output) print("Air con:") for out in output: print(out) inp = [5] output = [] compute(copy.copy(code), inp=inp, output=output) print("Radiators:") for out in output: print(out)
def test_detect_floats(self): with self.assertRaises(ValueError) as context: load_int_list(GetTestFilePath("input/intLIst/hasFloat"))
def test_load_negativeInts(self): ints = load_int_list(GetTestFilePath("input/intLIst/negativeInts")) self.assertListEqual( ints, [ 50962, 126857, -127476, 136169, -62054, 116866, 123235])
def test_load_ints(self): ints = load_int_list(GetTestFilePath("input/intLIst/123")) self.assertListEqual(ints, [1, 2, 3])
def main(): ages = load_int_list("input/d06.txt") print(part_one(ages, 80)) print(part_one(ages, 256))
def main(): positions = load_int_list("input/d07.txt") print(part_one(positions)) print(part_two(positions))
def main(): program = load_int_list("input/d02.txt") fixup_1202(program) compute(program) print(program[0]) print(find_and_encode(19690720))
def __init__(self): self.base_program = encode(load_int_list(make_path("input/d02.txt")))
def main(): code = load_int_list("input/d07.txt") print("Max thrust: {0}".format(find_max_thrust(code))) print("Max Feedback thrust: {0}".format( find_max_feedback_thrust(code)))