Skip to content

Instantly share code, notes, and snippets.

@katsuyan
Last active September 24, 2016 06:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katsuyan/9e143961e5311f94ec8908c536b638f0 to your computer and use it in GitHub Desktop.
Save katsuyan/9e143961e5311f94ec8908c536b638f0 to your computer and use it in GitHub Desktop.
数学パズルonLisp
(defun get-palindromes-num (&optional (i 11))
(if (and (string= (format nil "~vR" 2 i) (reverse (format nil "~vR" 2 i)))
(string= (format nil "~vR" 10 i) (reverse (format nil "~vR" 10 i)))
(string= (format nil "~vR" 8 i) (reverse (format nil "~vR" 8 i))))
i
(get-palindromes-num (+ 2 i))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment