diff options
author | Thomas Voss <thomasvoss@live.com> | 2021-12-02 10:05:22 +0100 |
---|---|---|
committer | Thomas Voss <thomasvoss@live.com> | 2021-12-02 10:05:22 +0100 |
commit | 8e6440d8fd69caedc11192dca02a6ae28f5248cf (patch) | |
tree | 3a99cb992870acbea9d887523f42378d9b1b28a2 /2015/21/puzzles.py | |
parent | 00b67942fed9961bd8d46d6f4fdae97dd074bb4e (diff) |
Improve the makeshift macros
Diffstat (limited to '2015/21/puzzles.py')
-rw-r--r-- | 2015/21/puzzles.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/2015/21/puzzles.py b/2015/21/puzzles.py index d355c77..e43829b 100644 --- a/2015/21/puzzles.py +++ b/2015/21/puzzles.py @@ -57,8 +57,7 @@ def main() -> None: # START PART 1 min_cost = 999999999999999999999999999999999999999999999999999999999 - # END PART 1 - # START PART 2 + # END PART 1 START PART 2 max_cost = 0 # END PART 2 @@ -72,16 +71,14 @@ def main() -> None: # START PART 1 if (delta > 0) or ((delta == 0) and wins(damage - b_armor, b_health)): min_cost = min(cost, min_cost) - # END PART 1 - # START PART 2 + # END PART 1 START PART 2 if (delta < 0) or ((delta == 0) and not wins(damage - b_armor, b_health)): max_cost = max(cost, max_cost) # END PART 2 # START PART 1 print(min_cost) - # END PART 1 - # START PART 2 + # END PART 1 START PART 2 print(max_cost) # END PART 2 |