Beispiel #1
0
def main():
    intcode = loadv2("data/d9.txt")
    intcode = Intcode(intcode)

    part1 = parse(intcode, 1)
    part2 = parse(intcode, 2)
    return part1, part2
Beispiel #2
0
def main():
    intcode = loadv2("data/d2.txt")
    target_value = 19690720
    for noun in range(100):
        for verb in range(100):
            intcode_copy = list(intcode)
            intcode_copy[1], intcode_copy[2] = noun, verb
            output = parser(intcode_copy)
            if output[0] == target_value:
                return 100 * noun + verb

    return float("inf")
Beispiel #3
0
def main():
    intcode = loadv2("data/d2.txt")
    intcode[1] = 12
    intcode[2] = 2
    intcode = parser(intcode)
    return intcode[0]
Beispiel #4
0
def main():
    intcode = loadv2("data/d7.txt")
    return max_thruster(intcode)
Beispiel #5
0
def main():
    intcode = loadv2("data/d5.txt")
    output = parse(intcode, input=1)
    return output
Beispiel #6
0
def main():
    data = loadv2("data/d11.txt")
    computer = Intcode()
    computer.load_data(data)
    n_unique_panels = paint(computer)
    return n_unique_panels