結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー toyuzukotoyuzuko
提出日時 2020-10-17 22:04:58
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 140 bytes
コンパイル時間 499 ms
コンパイル使用メモリ 87,236 KB
実行使用メモリ 71,652 KB
最終ジャッジ日時 2023-09-28 08:40:44
合計ジャッジ時間 4,224 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 78 ms
71,232 KB
testcase_02 AC 73 ms
71,372 KB
testcase_03 AC 74 ms
71,260 KB
testcase_04 AC 74 ms
71,248 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 74 ms
71,116 KB
testcase_10 AC 75 ms
71,248 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 74 ms
71,540 KB
testcase_14 AC 74 ms
71,476 KB
testcase_15 AC 74 ms
71,292 KB
testcase_16 AC 75 ms
71,376 KB
testcase_17 WA -
testcase_18 AC 73 ms
71,416 KB
testcase_19 WA -
testcase_20 AC 73 ms
71,256 KB
testcase_21 WA -
testcase_22 AC 73 ms
71,276 KB
testcase_23 WA -
testcase_24 AC 73 ms
71,460 KB
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
権限があれば一括ダウンロードができます

ソースコード

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)
0