8000 Small fix for day 25 · nthistle/advent-of-code@7950850 · GitHub
[go: up one dir, main page]

Skip to content {"props":{"docsUrl":"https://docs.github.com/get-started/accessibility/keyboard-shortcuts"}}

Commit 7950850

Browse files
committed
Small fix for day 25
1 parent 6a95ca7 commit 7950850

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

2022/day25/day25.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ def conv(x):
3131
b5.append(ans % 5)
3232
ans //= 5
3333

34-
b5.reverse()
34+
b5 = [0] + b5[::-1]
3535
while any(n >= 3 for n in b5):
3636
for i in range(len(b5)):
3737
if b5[i] >= 3:
3838
b5[i-1] += 1
3939
b5[i] -= 5
40-
print("".join(["0","1","2","=","-"][n] for n in b5))
40+
print("".join(["0","1","2","=","-"][n] for n in b5).lstrip("0"))
4141
print("click the button")

0 commit comments

Comments
 (0)
0