lisp(判斷迴文數)

(defun re(n) (setf len (length n)) (if (oddp len) (setf mid (/ (1+ len) 2)) (setf mid (/ len 2))) (or (and (oddp len) (equal (subseq n 0 (1- mid)) (reverse (subseq n mid)))) (an
相關文章
相關標籤/搜索