結果

問題 No.2142 Segment Zero
ユーザー ニックネームニックネーム
提出日時 2022-12-02 22:01:52
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 143 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-04-18 06:02:27
合計ジャッジ時間 7,373 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,624 KB
testcase_01 AC 203 ms
10,752 KB
testcase_02 AC 30 ms
10,624 KB
testcase_03 AC 291 ms
10,624 KB
testcase_04 AC 278 ms
10,624 KB
testcase_05 AC 282 ms
10,752 KB
testcase_06 AC 30 ms
10,624 KB
testcase_07 WA -
testcase_08 AC 212 ms
10,624 KB
testcase_09 WA -
testcase_10 AC 209 ms
10,624 KB
testcase_11 AC 202 ms
10,624 KB
testcase_12 AC 205 ms
10,624 KB
testcase_13 AC 209 ms
10,624 KB
testcase_14 AC 206 ms
10,624 KB
testcase_15 AC 209 ms
10,624 KB
testcase_16 AC 212 ms
10,624 KB
testcase_17 AC 176 ms
10,752 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 126 ms
10,624 KB
testcase_21 WA -
testcase_22 AC 155 ms
10,624 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 110 ms
10,624 KB
testcase_29 AC 126 ms
10,624 KB
testcase_30 AC 161 ms
10,624 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 206 ms
10,624 KB
testcase_36 AC 73 ms
10,624 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
ans = 0; i = n+1
for v in range(n, 0, -1):
    if k >= v: k -= v; i = v
    elif i == v+1: ans += 1
print(ans)
0