Skip to content

Instantly share code, notes, and snippets.

View kmyk's full-sized avatar

Kimiyuki Onaka kmyk

View GitHub Profile
@kmyk
kmyk / a.cl
Last active August 29, 2015 14:13 — forked from fukamachi/a.cl
指摘を受け入出力を減らした
; $ sbcl --load a.cl --eval '(sb-ext:save-lisp-and-die "a.out" :toplevel #'\''main :executable t)' && time ( echo 100000000 | ./a.out )
; ( echo 100000000 | ./a.out; ) 4.30s user 0.15s system 99% cpu 4.468 total
; $ sbcl --version
; SBCL 1.2.6
(defun main ()
(declare (optimize (speed 3) (debug 0) (safety 0) (compilation-speed 0)))
(let* ((n (1+ (the fixnum (read))))
(is-prime (make-array n :element-type 'boolean :initial-element t)))