From 7b5c3ff06d215c0b1da8b6f855235499f5f25668 Mon Sep 17 00:00:00 2001 From: Daniel Flanagan Date: Sat, 5 Dec 2020 08:03:03 -0600 Subject: [PATCH] Clarify magic number --- 2020/src/day5.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/2020/src/day5.nim b/2020/src/day5.nim index 31188ed..f7e08ed 100644 --- a/2020/src/day5.nim +++ b/2020/src/day5.nim @@ -25,6 +25,6 @@ proc part2*(s: Stream): int = for l in s.lines(): let id = cast[int](toId(row(l[0 .. 6]), col(l[7 .. ^1]))) ids.incl(id) - for i in 1..890: + for i in 1..890: # 890 is my answer from part 1 if ids.contains(i+1) and ids.contains(i-1) and not ids.contains(i): return i