結果
| 問題 | No.358 も~っと!門松列 |
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-07 19:30:29 |
| 言語 | Common Lisp (sbcl 2.6.3) |
| 結果 |
AC
|
| 実行時間 | 6 ms / 1,000 ms |
| コード長 | 669 bytes |
| 記録 | |
| コンパイル時間 | 749 ms |
| コンパイル使用メモリ | 33,680 KB |
| 実行使用メモリ | 22,144 KB |
| 最終ジャッジ日時 | 2026-05-08 02:56:33 |
| 合計ジャッジ時間 | 2,418 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 08 MAY 2026 02:56:28 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.018
ソースコード
(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