Update day 21 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:
@@ -24,9 +24,7 @@ def quantum_roll(state, p0, p1, s0, s1):
|
||||
|
||||
def part_1(input):
|
||||
result = 0
|
||||
pos = []
|
||||
pos.append(int(input[0].rstrip().split()[-1]) - 1)
|
||||
pos.append(int(input[1].rstrip().split()[-1]) - 1)
|
||||
pos = [int(line.rstrip().split()[-1]) - 1 for line in input]
|
||||
score = [0, 0]
|
||||
p = 0
|
||||
dice = 1
|
||||
@@ -48,8 +46,7 @@ def part_1(input):
|
||||
def part_2(input):
|
||||
result = 0
|
||||
state = {}
|
||||
p0 = int(input[0].rstrip().split()[-1]) - 1
|
||||
p1 = int(input[1].rstrip().split()[-1]) - 1
|
||||
p0, p1 = [int(line.rstrip().split()[-1]) - 1 for line in input]
|
||||
result = max(quantum_roll(state, p0, p1, 0, 0))
|
||||
print("Part 2 result:", result)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user