結果

問題 No.713 素数の和
コンテスト
ユーザー Common Lisp
提出日時 2024-11-07 19:50:21
言語 Common Lisp
(sbcl 2.6.7)
コンパイル:
sbclc _filename_
実行:
sbcl --script Main.fasl
結果
AC  
実行時間 11 ms / 2,000 ms
+ 709µs
コード長 351 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 834 ms
コンパイル使用メモリ 35,836 KB
実行使用メモリ 25,796 KB
最終ジャッジ日時 2026-09-20 20:09:11
合計ジャッジ時間 2,234 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 20 SEP 2026 08:09:09 PM):

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

ソースコード

diff #
raw source code

(defun main (&rest argv)
  (declare (ignorable argv))
  (let* ((n (read))
         (res 0))
    (loop for i from 1 to n do
          (let ((c 0))
            (loop for j from 1 to n
                  when (zerop (mod i j))
                    do (incf c))
            (when (= c 2)
                  (incf res i))))
    (format t "~d~%" res)))

(main)
0