You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My solution to 2015 Day 24 returns the first solution it finds. In many cases this is right, but there are counter examples:
INPUT: 1 3 5 13 17 23 31 37 53
[1, 23, 37], QE is 851.
[3, 5, 53], QE is 795.
or
INPUT: 1 2 3 6 7 8 9 11 16
[1, 9, 11], QE is 99,
[2, 3, 16], QE is 96.
My initial code can handle this, but my cleaned up version does not. The way to handle this is to keep track of the smallest in the top of the loop and then do the same towards the bottom, but I think this makes the code more ugly, so I'm putting it of until later.
The text was updated successfully, but these errors were encountered:
My solution to 2015 Day 24 returns the first solution it finds. In many cases this is right, but there are counter examples:
or
My initial code can handle this, but my cleaned up version does not. The way to handle this is to keep track of the smallest in the top of the loop and then do the same towards the bottom, but I think this makes the code more ugly, so I'm putting it of until later.
The text was updated successfully, but these errors were encountered: