thanks tali 2
This commit is contained in:
parent
0dc8f77ac8
commit
72cfa6bb6c
2
6.rkt
2
6.rkt
|
@ -7,7 +7,7 @@
|
||||||
(define (do-race time dist)
|
(define (do-race time dist)
|
||||||
(match-define (list lower upper)
|
(match-define (list lower upper)
|
||||||
(quadratic-solutions 1 (- time) dist))
|
(quadratic-solutions 1 (- time) dist))
|
||||||
(inexact->exact (- (ceiling upper) (add1 (floor lower)))))
|
(inexact->exact (- (ceiling upper) (floor lower) 1)))
|
||||||
|
|
||||||
(define (part1 input)
|
(define (part1 input)
|
||||||
(for/product ([time (in-list (first input))]
|
(for/product ([time (in-list (first input))]
|
||||||
|
|
Loading…
Reference in New Issue