結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー toyuzuko
提出日時 2020-10-17 22:05:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 2,000 ms
コード長 144 bytes
コンパイル時間 271 ms
コンパイル使用メモリ 82,388 KB
実行使用メモリ 53,816 KB
最終ジャッジ日時 2024-07-21 03:10:59
合計ジャッジ時間 2,577 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

N, K = map(int, input().split())
if K == 0 or K > N:
    print(0)
elif N % 2 == 1 and (N + 1) // 2 == K:
    print(N - 1)
else:
    print(N - 2)
0