Fork me on GitHub
#adventofcode
<
2019-12-22
>
dmarjenburgh12:12:04

Anyone have any tips for day 22 part 2? I think I need to revisit my algebra courses. Put possible spoilers in thread.

dmarjenburgh12:12:04

Anyone have any tips for day 22 part 2? I think I need to revisit my algebra courses. Put possible spoilers in thread.

dmarjenburgh12:12:00

In noticed both the number of cards in the deck and the number of times you repeat the shuffle process are prime numbers.

Alper Cugun21:12:59

I hope nobody minds me posting AoC as far back as this but after the rough start on part 1, assembling the part 2 solution from its components was a breeze.

dmarjenburgh21:12:31

Phew, finally solved today. Spent so much time going in wrong directions… I put the explanation in a comment https://gitlab.com/dmarjenburgh/adventofcode/blob/c7b250a5e60733fef2c6c01c5099125ef29d9c48/src/adventofcode/year_2019.clj#L732-776

nam.hyunwoo01:12:26

thanks. i wasn't aware of modular inverse and that's why my division made the different answer..