結果
| 問題 | No.2782 メルセンヌ数総乗 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-21 00:54:41 |
| 言語 | Common Lisp (sbcl 2.6.7) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 2,000 ms |
| + 459µs | |
| コード長 | 709 bytes |
| 記録 | |
| コンパイル時間 | 678 ms |
| コンパイル使用メモリ | 27,520 KB |
| 実行使用メモリ | 23,680 KB |
| 最終ジャッジ日時 | 2026-08-20 20:23:48 |
| 合計ジャッジ時間 | 3,149 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
| 外部呼び出し有り |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 20 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 20 AUG 2026 08:23:45 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.025
ソースコード
#-swank
(unless (member :child-sbcl *features*)
(quit
:recklessly-p t
:unix-status
(process-exit-code
(run-program *runtime-pathname*
`("--control-stack-size" "1024MB"
"--noinform" "--disable-ldb" "--lose-on-corruption" "--end-runtime-options"
"--eval" "(push :child-sbcl *features*)"
"--script" ,(namestring *load-pathname*))
:output t :error t :input t))))
(defun main ()
(let* ((N (read))
(answer 1)
(MOD (1- (ash 1 (1+ N)))))
(loop for i from 2 to N do
(setf answer (mod (* answer (1- (ash 1 i))) MOD)))
(format t "~A~%" (if (= answer 0) "Yes" "No"))))
(main)