1
0
Fork 0
This commit is contained in:
Jonathan Chan 2020-12-24 22:19:41 -08:00 committed by Jonathan Chan
parent 6b7046e910
commit 818b64f9c7
1 changed files with 17 additions and 0 deletions

17
src/25.rkt Normal file
View File

@ -0,0 +1,17 @@
#lang racket
(require math/number-theory
"../lib.rkt")
(define card 9033205)
(define door 9281649)
(define door-loop
(for/first ([loop (in-naturals)]
#:when (= (modular-expt 7 loop 20201227) door))
loop))
(define part1
(modular-expt card door-loop 20201227))
(show-solution part1 "Done!")