結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー matriematrie
提出日時 2020-12-03 00:41:28
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 109 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 10,636 KB
実行使用メモリ 816,968 KB
最終ジャッジ日時 2023-10-11 12:09:02
合計ジャッジ時間 2,680 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,820 KB
testcase_01 AC 15 ms
7,836 KB
testcase_02 AC 15 ms
7,876 KB
testcase_03 AC 16 ms
7,796 KB
testcase_04 AC 16 ms
7,832 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 MLE -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k = map(int, input().split())
l = [1]*n
if k==0 or k>n: l = [0]*n
else: l[k-1] = 0; l[-k] = 0
print(sum(l))
0