Happy Holidays! Sad that it's over! Pleased that it was a quick one today as I was thinking I'd have to do it tomorrow... Anyway all pretty straightforward in any language and so my choice Haskell:
card = 2069194 cardSize = size card 1 0 door = 16426071 doorSize = size 7 door 1 0 step s c = c * s `mod` 20201227 size s k c n | k == c = n | otherwise = size s k (step s c) (n+1) private s c 0 = c private s c n = private s (step s c) (n-1) main = print (private card 1 doorSize)
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Happy Holidays! Sad that it's over! Pleased that it was a quick one today as I was thinking I'd have to do it tomorrow... Anyway all pretty straightforward in any language and so my choice Haskell: