結果

問題 No.2142 Segment Zero
ユーザー 👑 H20H20
提出日時 2022-12-02 21:53:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 212 bytes
コンパイル時間 277 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 244,940 KB
最終ジャッジ日時 2024-04-18 05:47:17
合計ジャッジ時間 16,609 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 47 ms
51,328 KB
testcase_01 AC 474 ms
242,868 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 584 ms
242,552 KB
testcase_05 AC 589 ms
243,308 KB
testcase_06 AC 44 ms
51,200 KB
testcase_07 AC 476 ms
243,188 KB
testcase_08 AC 586 ms
243,060 KB
testcase_09 AC 483 ms
243,192 KB
testcase_10 AC 585 ms
243,064 KB
testcase_11 AC 647 ms
242,940 KB
testcase_12 AC 630 ms
243,320 KB
testcase_13 AC 676 ms
242,680 KB
testcase_14 AC 665 ms
243,188 KB
testcase_15 AC 653 ms
243,328 KB
testcase_16 AC 610 ms
243,324 KB
testcase_17 AC 498 ms
242,944 KB
testcase_18 AC 136 ms
130,176 KB
testcase_19 AC 137 ms
123,008 KB
testcase_20 AC 332 ms
240,640 KB
testcase_21 AC 340 ms
242,944 KB
testcase_22 AC 447 ms
242,688 KB
testcase_23 AC 125 ms
122,880 KB
testcase_24 AC 171 ms
158,464 KB
testcase_25 AC 212 ms
190,720 KB
testcase_26 AC 376 ms
242,944 KB
testcase_27 AC 379 ms
243,200 KB
testcase_28 AC 277 ms
206,720 KB
testcase_29 AC 322 ms
240,384 KB
testcase_30 AC 424 ms
242,560 KB
testcase_31 AC 335 ms
242,944 KB
testcase_32 AC 167 ms
148,480 KB
testcase_33 AC 95 ms
101,120 KB
testcase_34 AC 212 ms
190,848 KB
testcase_35 AC 568 ms
242,816 KB
testcase_36 AC 144 ms
129,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K = map(int, input().split())
all = N*(N+1)//2
U = set()
D = set()
for i in range(1,N+1):
    v = i*(i+1)//2
    U.add(v)
    D.add(all-v)
for u in U:
    if K-u in D:
        print(1)
        exit()
print(2)

0