結果
問題 | No.3023 素数判定するだけ |
ユーザー | Common Lisp |
提出日時 | 2024-10-17 12:53:41 |
言語 | Common Lisp (sbcl 2.3.8) |
結果 |
AC
|
実行時間 | 11 ms / 1,000 ms |
コード長 | 6,416 bytes |
コンパイル時間 | 293 ms |
コンパイル使用メモリ | 36,940 KB |
実行使用メモリ | 31,764 KB |
最終ジャッジ日時 | 2024-10-17 12:53:47 |
合計ジャッジ時間 | 4,829 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 11 ms
29,760 KB |
testcase_01 | AC | 9 ms
25,640 KB |
testcase_02 | AC | 11 ms
31,764 KB |
testcase_03 | AC | 9 ms
25,768 KB |
testcase_04 | AC | 9 ms
25,768 KB |
testcase_05 | AC | 10 ms
27,856 KB |
testcase_06 | AC | 10 ms
25,768 KB |
testcase_07 | AC | 9 ms
25,764 KB |
testcase_08 | AC | 10 ms
29,856 KB |
testcase_09 | AC | 10 ms
29,860 KB |
testcase_10 | AC | 10 ms
27,848 KB |
testcase_11 | AC | 11 ms
29,864 KB |
testcase_12 | AC | 9 ms
25,768 KB |
testcase_13 | AC | 11 ms
25,896 KB |
testcase_14 | AC | 10 ms
29,884 KB |
testcase_15 | AC | 9 ms
25,764 KB |
testcase_16 | AC | 10 ms
25,768 KB |
testcase_17 | AC | 10 ms
29,860 KB |
testcase_18 | AC | 10 ms
25,772 KB |
testcase_19 | AC | 9 ms
25,640 KB |
testcase_20 | AC | 10 ms
25,768 KB |
testcase_21 | AC | 10 ms
25,768 KB |
testcase_22 | AC | 9 ms
25,768 KB |
testcase_23 | AC | 10 ms
27,680 KB |
testcase_24 | AC | 11 ms
25,768 KB |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 17 OCT 2024 12:53:41 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.010
ソースコード
; (defparameter pred '("NO" "NO" "YES" "YES" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO" "NO" "NO" "YES" "NO" "NO" "NO")) ; (princ (elt pred (read))) (defconstant one (length ">")) (defconstant a (length ">>")) (defconstant b (length ">>>")) (defconstant c (length ">>>>>")) (defconstant d (length ">>>>>>>")) (defconstant e (length ">>>>>>>>>>>")) (defconstant f (length ">>>>>>>>>>>>>")) (defconstant g (length ">>>>>>>>>>>>>>>>>")) (defconstant h (length ">>>>>>>>>>>>>>>>>>>")) (defconstant i (length ">>>>>>>>>>>>>>>>>>>>>>>")) (defconstant j (length ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>")) (defconstant k (length ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>")) (defun check (n) (cond ((= one n) "NO") ((or (= n a) (= n b) (= n c) (= n d) (= n e) (= n f) (= n g) (= n h) (= n i) (= n j) (= n k)) "YES") ((or (zerop (mod n a)) (zerop (mod n b)) (zerop (mod n c)) (zerop (mod n d)) (zerop (mod n e)) (zerop (mod n f)) (zerop (mod n g)) (zerop (mod n h)) (zerop (mod n i)) (zerop (mod n j)) (zerop (mod n k))) "NO") (t "YES"))) (princ (check (read)))