結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー ducktail
提出日時 2017-12-28 21:30:37
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 185 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 6,816 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2024-12-21 09:26:13
合計ジャッジ時間 1,878 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (main args)
  (let* ([n (read)]
         [k (read)])
    (print
     (cond [(or (zero? k) (> k n)) 0]
           [(= (* 2 k) (+ n 1)) (- n 1)]
           [else (- n 2)])))
  0)
0