summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tomasz@kramkow.ski>2022-12-16 16:12:24 +0000
committerTomasz Kramkowski <tomasz@kramkow.ski>2022-12-16 16:12:24 +0000
commit67116c06713074e3782ddea2f3658490bf22bf67 (patch)
tree42004c554ca99d3f28243ab4249abb1f3844b35d
parent8690ab12904c2673db74ec9fdfc52f5b8d8bf2dc (diff)
downloadaoc2022-67116c06713074e3782ddea2f3658490bf22bf67.tar.gz
aoc2022-67116c06713074e3782ddea2f3658490bf22bf67.tar.xz
aoc2022-67116c06713074e3782ddea2f3658490bf22bf67.zip
16 line length
-rw-r--r--16.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/16.py b/16.py
index 779b8aa..a8819f3 100644
--- a/16.py
+++ b/16.py
@@ -48,7 +48,8 @@ def recurse(open_valves=frozenset(), current='AA', flow=0, time_left=30):
flow + cflow * cost, time_left - cost)
best = max(best, new)
if current not in open_valves and time_left > 0 and cnode.flow > 0:
- best = max(best, recurse(open_valves | {current}, current, flow + cflow, time_left - 1))
+ best = max(best, recurse(open_valves | {current}, current,
+ flow + cflow, time_left - 1))
return best
print(recurse())