Solve 2019 day 14 and 15
This commit is contained in:
@@ -8,13 +8,13 @@ def part_1(data):
|
||||
while not a.done:
|
||||
a.go()
|
||||
|
||||
r = sum([a.outputs[i:i+3][2] == 2 for i in range(0, len(a.outputs), 3)])
|
||||
r = sum([a.outputs[i : i + 3][2] == 2 for i in range(0, len(a.outputs), 3)])
|
||||
print(r)
|
||||
|
||||
|
||||
def part_2(data):
|
||||
xs = str_to_ints(data)
|
||||
xs[0] = 2 # play for free
|
||||
xs[0] = 2 # play for free
|
||||
a = Amp(xs)
|
||||
ball_x = 0
|
||||
paddle_x = 0
|
||||
|
||||
Reference in New Issue
Block a user