結果
| 問題 | No.502 階乗を計算するだけ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-04-23 15:53:45 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 618 bytes |
| 記録 | |
| コンパイル時間 | 374 ms |
| コンパイル使用メモリ | 27,264 KB |
| 実行使用メモリ | 286,592 KB |
| 最終ジャッジ日時 | 2024-10-15 16:20:51 |
| 合計ジャッジ時間 | 7,261 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 32 RE * 20 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 15 OCT 2024 04:20:43 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.060
ソースコード
(unless (member :child-sbcl *features*)
(quit
:recklessly-p t
:unix-status
(process-exit-code
(run-program *runtime-pathname*
`("--control-stack-size" "256MB"
"--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 fact (n)
(if (= n 0)
1
(mod (* n (fact (- n 1))) 1000000007)))
(defun main ()
(let ((n (read)))
(format t "~d~%" (fact n))))
(main)