結果

問題 No.531 エヌスクミ島の平和協定
ユーザー Common LispCommon Lisp
提出日時 2024-11-06 18:14:59
言語 Common Lisp
(sbcl 2.5.0)
結果
AC  
実行時間 10 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 1,534 ms
コンパイル使用メモリ 32,960 KB
実行使用メモリ 21,888 KB
最終ジャッジ日時 2024-11-06 18:15:03
合計ジャッジ時間 3,057 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 37
権限があれば一括ダウンロードができます
コンパイルメッセージ
; compiling file "/home/judge/data/code/Main.lisp" (written 06 NOV 2024 06:15:00 PM):

; wrote /home/judge/data/code/Main.fasl
; compilation finished in 0:00:00.024

ソースコード

diff #

(defun main (&rest argv)
  (declare (ignorable argv))
  (let* ((n (read))
         (m (read)))
    (format t "~d~%" (cond
                      ((and (> n m) (evenp n) (<= (floor n 2) m))
                        2)
                      ((<= n m)
                        1)
                      (t
                        -1)))))

(main)
0