結果

問題 No.3023 素数判定するだけ
ユーザー Common LispCommon Lisp
提出日時 2024-10-17 12:51:59
言語 Common Lisp
(sbcl 2.3.8)
結果
WA  
実行時間 -
コード長 6,360 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 38,800 KB
実行使用メモリ 29,884 KB
最終ジャッジ日時 2024-10-17 12:52:07
合計ジャッジ時間 7,501 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
25,772 KB
testcase_01 AC 10 ms
25,640 KB
testcase_02 WA -
testcase_03 AC 10 ms
25,772 KB
testcase_04 AC 10 ms
25,768 KB
testcase_05 AC 10 ms
25,772 KB
testcase_06 AC 10 ms
27,856 KB
testcase_07 AC 9 ms
25,640 KB
testcase_08 AC 10 ms
25,764 KB
testcase_09 AC 10 ms
25,640 KB
testcase_10 AC 11 ms
29,860 KB
testcase_11 AC 10 ms
27,812 KB
testcase_12 AC 10 ms
25,772 KB
testcase_13 AC 9 ms
25,772 KB
testcase_14 AC 11 ms
29,884 KB
testcase_15 AC 10 ms
25,640 KB
testcase_16 AC 10 ms
25,768 KB
testcase_17 AC 10 ms
25,772 KB
testcase_18 AC 10 ms
25,768 KB
testcase_19 AC 10 ms
27,728 KB
testcase_20 AC 9 ms
25,768 KB
testcase_21 AC 9 ms
25,644 KB
testcase_22 AC 10 ms
29,860 KB
testcase_23 AC 10 ms
29,860 KB
testcase_24 AC 10 ms
29,864 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 17 OCT 2024 12:51:59 PM):

; wrote /home/judge/data/code/Main.fasl
; compilation finished in 0:00:00.009

ソースコード

diff #

; (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 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 ((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)))
0