This commit is contained in:
Jonathan Chan 2020-12-24 22:19:41 -08:00
parent 123ed9edc0
commit 6de1dce13a
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!")