結果
| 問題 |
No.485 方程式のお勉強
|
| コンテスト | |
| ユーザー |
Common Lisp
|
| 提出日時 | 2024-10-09 23:00:38 |
| 言語 | Common Lisp (sbcl 2.5.0) |
| 結果 |
AC
|
| 実行時間 | 10 ms / 2,000 ms |
| コード長 | 425 bytes |
| コンパイル時間 | 367 ms |
| コンパイル使用メモリ | 29,864 KB |
| 実行使用メモリ | 21,888 KB |
| 最終ジャッジ日時 | 2024-10-09 23:00:39 |
| 合計ジャッジ時間 | 1,276 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 13 |
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 09 OCT 2024 11:00:37 PM): ; wrote /home/judge/data/code/Main.fasl ; compilation finished in 0:00:00.002
ソースコード
; A * x + y = B のとき 「B 割る A = 商 x あまり y」
; というので解 x があるときは y == 0 であるとき
; つまり B % A == 0 のとき x = B / A を出力する
; y != 0 のときは NO を出力する
(defun main (&rest argv)
(declare (ignorable argv))
(let* ((a (read))
(b (read)))
(princ (if (zerop (mod b a))
(floor b a)
'NO))
(terpri)))
(main)
Common Lisp