結果
| 問題 |
No.2749 随伴関手入門
|
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-13 21:48:45 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 2,000 ms |
| コード長 | 342 bytes |
| コンパイル時間 | 263 ms |
| コンパイル使用メモリ | 27,008 KB |
| 実行使用メモリ | 22,016 KB |
| 最終ジャッジ日時 | 2024-11-13 21:48:47 |
| 合計ジャッジ時間 | 1,830 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 30 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 13 NOV 2024 09:48:45 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.004
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((n (read))
(a (mod 1 n))
(b (mod 1 n))
(tmp 0)
(res 1))
(loop while (not (zerop a)) do
(setf res (1+ res)
tmp a
a (mod b n)
b (mod (+ tmp b) n)))
(format t "~d~%" res)))
(main)
Common Lisp