aboutsummaryrefslogtreecommitdiff
path: root/2021/08/puzzle-2.py
diff options
context:
space:
mode:
authorThomas Voss <thomasvoss@live.com> 2021-12-08 07:22:16 +0100
committerThomas Voss <thomasvoss@live.com> 2021-12-08 07:22:16 +0100
commitfe2fb0311160440fb4a2ba782984b1c92865f91d (patch)
treee5cd21b9fbbf7e1af63a408009f3742cbb745768 /2021/08/puzzle-2.py
parent239e1ac49ccf55e38a5f14f2a7a7cc59f6e146d5 (diff)
Remove more useless constructors
Diffstat (limited to '2021/08/puzzle-2.py')
-rwxr-xr-x2021/08/puzzle-2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/2021/08/puzzle-2.py b/2021/08/puzzle-2.py
index 74d2aad..0ebb2d3 100755
--- a/2021/08/puzzle-2.py
+++ b/2021/08/puzzle-2.py
@@ -39,8 +39,8 @@ def solve(nums: list[str]) -> int:
acc = 0
for n, (k, v) in itertools.product(nums, nummap.items()):
- if set(v) == set(n):
- acc = acc * 10 + int(k)
+ if set(n) == v:
+ acc = acc * 10 + k
return acc