結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー nohakai3nohakai3
提出日時 2022-08-02 11:29:17
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 170 bytes
コンパイル時間 788 ms
コンパイル使用メモリ 10,712 KB
実行使用メモリ 816,708 KB
最終ジャッジ日時 2023-09-30 10:14:04
合計ジャッジ時間 3,609 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,892 KB
testcase_01 WA -
testcase_02 AC 14 ms
8,108 KB
testcase_03 AC 14 ms
8,084 KB
testcase_04 AC 15 ms
7,944 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:
    print(0)
    exit()
elif k>n:
    print(0)
    exit()
    
else:
    l[k-1]=0
    l[-(k-1)]=0
    print(l.count(1))

0