From 14379b035fce2c6d19baf9fccaa26a7e69a1be66 Mon Sep 17 00:00:00 2001 From: Lowl3v3l Date: Tue, 9 May 2017 20:10:38 +0200 Subject: [PATCH] problem 4 solution in racket --- 4/euler4.rkt | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 4/euler4.rkt diff --git a/4/euler4.rkt b/4/euler4.rkt new file mode 100644 index 0000000..3e35d05 --- /dev/null +++ b/4/euler4.rkt @@ -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)))))) \ No newline at end of file