結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー matriematrie
提出日時 2020-12-03 00:40:36
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
RE  
実行時間 -
コード長 102 bytes
コンパイル時間 96 ms
コンパイル使用メモリ 10,728 KB
実行使用メモリ 816,748 KB
最終ジャッジ日時 2023-10-11 12:08:59
合計ジャッジ時間 2,946 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,824 KB
testcase_01 AC 17 ms
7,972 KB
testcase_02 AC 17 ms
7,976 KB
testcase_03 RE -
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
l[k-1] = 0
l[-k] = 0
print(sum(l))
0