結果
| 問題 |
No.894 二種類のバス
|
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-11-06 09:29:30 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 11 ms / 1,000 ms |
| コード長 | 374 bytes |
| コンパイル時間 | 202 ms |
| コンパイル使用メモリ | 38,904 KB |
| 実行使用メモリ | 31,892 KB |
| 最終ジャッジ日時 | 2024-11-06 09:29:31 |
| 合計ジャッジ時間 | 1,154 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 17 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 06 NOV 2024 09:29:29 AM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.033
ソースコード
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((s (read))
(a (read))
(b (read))
(c (floor (* a b) (gcd a b)))
(res (- (+ (floor s a) (floor s b)) (floor s c))))
(unless (zerop (mod s a)) (incf res))
(unless (zerop (mod s b)) (incf res))
(unless (zerop (mod s c)) (decf res))
(format t "~d~%" res)))
(main)
Common Lisp