Update day 13 solution
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -27,7 +27,7 @@ def part_1(input):
|
||||
dots.add((int(x), int(y)))
|
||||
elif 'fold along' in line:
|
||||
d, c = line.strip().split()[-1].split('=')
|
||||
instructions.append([d, int(c)])
|
||||
instructions.append((d, int(c)))
|
||||
dots = fold(instructions.pop(0), dots)
|
||||
result = len(dots)
|
||||
print("Part 1 result:", result)
|
||||
@@ -43,7 +43,7 @@ def part_2(input):
|
||||
dots.add((int(x), int(y)))
|
||||
elif 'fold along' in line:
|
||||
d, c = line.strip().split()[-1].split('=')
|
||||
instructions.append([d, int(c)])
|
||||
instructions.append((d, int(c)))
|
||||
|
||||
while len(instructions):
|
||||
dots = fold(instructions.pop(0), dots)
|
||||
|
||||
Reference in New Issue
Block a user