This commit is contained in:
Daniel Flanagan 2021-12-08 11:34:33 -06:00
parent 80dfe260f0
commit e9e1909c88
Signed by: lytedev
GPG Key ID: 5B2020A0F9921EF4
1 changed files with 1 additions and 2 deletions

View File

@ -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