Quick thought to come back to

This commit is contained in:
Daniel Flanagan 2020-12-14 10:23:01 -06:00
parent 97d2ca55e7
commit 35742a00a3
Signed by: lytedev
GPG key ID: 5B2020A0F9921EF4

View file

@ -22,6 +22,7 @@ proc part2*(s: Stream): int =
var i = 0 var i = 0
while true: while true:
# TODO: this takes too long, need to learn the math? # TODO: this takes too long, need to learn the math?
# maybe between each bus there is a regular period of these "coincidences" and we can reduce along those?
for j in 1..<ss.len: for j in 1..<ss.len:
if bb.contains j: if bb.contains j:
let d = i+j let d = i+j