problem 4 solution in racket
This commit is contained in:
parent
7ae79991f5
commit
14379b035f
1 changed files with 9 additions and 0 deletions
9
4/euler4.rkt
Normal file
9
4/euler4.rkt
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#lang racket
|
||||||
|
|
||||||
|
(define (palindrome-number? n)
|
||||||
|
(equal? (string->list (number->string n))
|
||||||
|
(reverse (string->list (number->string n)))))
|
||||||
|
|
||||||
|
(apply max (filter palindrome-number?
|
||||||
|
(flatten (for/list ((i (range 100 1000)))
|
||||||
|
(for/list ((j (range 100 1000))) (* i j))))))
|
Reference in a new issue