From e9e1909c88293131a354c2585975798b6ec719ed Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Wed, 8 Dec 2021 11:34:33 -0600 Subject: [PATCH] Cleanup --- 2021/eight.nim | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/2021/eight.nim b/2021/eight.nim index 49b6fbf..d99ce8a 100644 --- a/2021/eight.nim +++ b/2021/eight.nim @@ -27,8 +27,7 @@ proc p2(c: seq[string]): int = of 6: 0 of 5: 6 else: 9 - let x = (abs(oLine[1].len() - i) - 1) - result += outputVal * int(10 ^ x) + result += outputVal * int(10 ^ (abs(oLine[1].len() - i) - 1)) # Explanation: # 1, 7, 8, and 4 are known and may be identified just by length, so we only