We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4528397 commit f98edfdCopy full SHA for f98edfd
2024/13/script.py
@@ -2,7 +2,7 @@
2
from GhostyUtils.vec2 import Vec2
3
4
5
-def solve(machine: list[list[tuple], tuple], offset: int = 0):
+def solve(machine: list[list[tuple], tuple], offset: int = 0) -> int:
6
a, b = [Vec2(button) for button in machine[0]]
7
p = Vec2(machine[1]) + Vec2(offset, offset)
8
@@ -30,7 +30,7 @@ def main():
30
machines = []
31
for mch in inputs:
32
mch = mch.splitlines()
33
- buttons = [tuple(int(coord[2:])
+ buttons = [tuple(int(coord[1:])
34
for coord in btn.split(': ')[1].split(', '))
35
for btn in mch[:2]]
36
prize = tuple(int(coord[2:]) for coord in mch[2].split(': ')[1].split(', '))
0 commit comments