結果
| 問題 | No.358 も~っと!門松列 |
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-07 19:30:29 |
| 言語 | Common Lisp (sbcl 2.6.7) |
| 結果 |
AC
不安定
|
| 実行時間 | 7 ms / 1,000 ms |
| + 16µs | |
| コード長 | 669 bytes |
| 記録 | |
| コンパイル時間 | 1,004 ms |
| コンパイル使用メモリ | 39,184 KB |
| 実行使用メモリ | 27,776 KB |
| 最終ジャッジ日時 | 2026-09-20 19:55:11 |
| 合計ジャッジ時間 | 1,965 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 20 SEP 2026 07:55:08 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.039
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((a (read))
(b (read))
(c (read)))
(cond ((or (= a b) (= b c) (= c a))
(format t "0~%"))
((or (and (< b a) (< b c)) (and (> b a) (> b c)))
(format t "INF~%"))
(t
(let ((ans 0))
(loop for i from 2 to (max a c) do
(let ((p (mod a i))
(q (mod b i))
(r (mod c i)))
(when (and (/= p r) (or (and (< q p) (< q r)) (and (> q p) (> q r))))
(incf ans))))
(format t "~d~%" ans))))))
(main)
Common Lisp