Day 17.
This commit is contained in:
parent
67647c7923
commit
d493856d20
@ -130,14 +130,14 @@ tower, *_ = build_tower(2022, line)
|
|||||||
answer_1 = tower_hight(tower)
|
answer_1 = tower_hight(tower)
|
||||||
print(f"answer 1 is {answer_1}")
|
print(f"answer 1 is {answer_1}")
|
||||||
|
|
||||||
total_rocks = 1_000_000_000_000
|
TOTAL_ROCKS = 1_000_000_000_000
|
||||||
tower_1, n_rocks_1, (i_rocks_1, i_jet_1), prev_1 = build_tower(total_rocks, line, True)
|
tower_1, n_rocks_1, (i_rocks_1, i_jet_1), prev_1 = build_tower(TOTAL_ROCKS, line, True)
|
||||||
|
|
||||||
# shift the line
|
# shift the line
|
||||||
line = line[i_jet_1:] + line[:i_jet_1]
|
line = line[i_jet_1:] + line[:i_jet_1]
|
||||||
|
|
||||||
# remaining rocks
|
# remaining rocks
|
||||||
remaining_rocks = total_rocks - n_rocks_1
|
remaining_rocks = TOTAL_ROCKS - n_rocks_1
|
||||||
n_repeat_rocks = n_rocks_1 - prev_1
|
n_repeat_rocks = n_rocks_1 - prev_1
|
||||||
|
|
||||||
# repeated tower
|
# repeated tower
|
||||||
|
Loading…
Reference in New Issue
Block a user