結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー ducktailducktail
提出日時 2017-12-28 21:30:37
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 2,000 ms
コード長 185 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 11,952 KB
最終ジャッジ日時 2023-08-23 08:14:10
合計ジャッジ時間 2,432 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,752 KB
testcase_01 AC 18 ms
11,668 KB
testcase_02 AC 19 ms
11,732 KB
testcase_03 AC 18 ms
11,680 KB
testcase_04 AC 17 ms
11,668 KB
testcase_05 AC 17 ms
11,732 KB
testcase_06 AC 17 ms
11,724 KB
testcase_07 AC 17 ms
11,756 KB
testcase_08 AC 17 ms
11,728 KB
testcase_09 AC 17 ms
11,668 KB
testcase_10 AC 17 ms
11,720 KB
testcase_11 AC 18 ms
11,648 KB
testcase_12 AC 18 ms
11,648 KB
testcase_13 AC 18 ms
11,720 KB
testcase_14 AC 17 ms
11,836 KB
testcase_15 AC 17 ms
11,768 KB
testcase_16 AC 17 ms
11,952 KB
testcase_17 AC 17 ms
11,880 KB
testcase_18 AC 17 ms
11,664 KB
testcase_19 AC 17 ms
11,720 KB
testcase_20 AC 18 ms
11,764 KB
testcase_21 AC 17 ms
11,640 KB
testcase_22 AC 17 ms
11,864 KB
testcase_23 AC 18 ms
11,952 KB
testcase_24 AC 17 ms
11,656 KB
testcase_25 AC 17 ms
11,668 KB
testcase_26 AC 17 ms
11,756 KB
testcase_27 AC 16 ms
11,652 KB
権限があれば一括ダウンロードができます

ソースコード

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