- プログラミングのお題スレ Part5
358 :デフォルトの名無しさん[sage]:2014/10/21(火) 02:19:00.14 ID:u6hR3S9i - >>339 Emacs Lisp
誤 (- (apply (quote max) x) (car x)) 正 (- (apply (quote max) (cdr x)) (car x)) % cat example3.txt 10 9 7 4 0 % cat example3.txt | emacs -batch -Q --eval='(progn (require (quote cl-lib)) (let (l) (cl-loop (let ((x (ignore-errors (read)))) (if x (push x l) (cl-return)))) > (print (apply (quote max) (cl-mapcon (lambda (x) (when (cdr x) (list (- (apply (quote max) (cdr x)) (car x))))) (reverse l))))))' | sed 's/Lisp expression://g' -1
|