結果

問題 No.2142 Segment Zero
ユーザー ニックネームニックネーム
提出日時 2022-12-02 22:45:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,671 ms / 2,000 ms
コード長 175 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 139,188 KB
最終ジャッジ日時 2024-04-18 07:54:54
合計ジャッジ時間 35,707 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
10,624 KB
testcase_01 AC 1,218 ms
139,188 KB
testcase_02 AC 26 ms
10,624 KB
testcase_03 AC 1,157 ms
139,060 KB
testcase_04 AC 1,556 ms
139,060 KB
testcase_05 AC 1,535 ms
139,064 KB
testcase_06 AC 26 ms
10,624 KB
testcase_07 AC 1,238 ms
139,060 KB
testcase_08 AC 1,506 ms
139,060 KB
testcase_09 AC 1,193 ms
139,064 KB
testcase_10 AC 1,580 ms
139,056 KB
testcase_11 AC 1,540 ms
139,184 KB
testcase_12 AC 1,512 ms
139,060 KB
testcase_13 AC 1,512 ms
139,184 KB
testcase_14 AC 1,671 ms
139,184 KB
testcase_15 AC 1,555 ms
139,184 KB
testcase_16 AC 1,531 ms
139,060 KB
testcase_17 AC 1,280 ms
132,156 KB
testcase_18 AC 272 ms
41,868 KB
testcase_19 AC 234 ms
41,148 KB
testcase_20 AC 823 ms
78,356 KB
testcase_21 AC 725 ms
82,708 KB
testcase_22 AC 1,158 ms
132,256 KB
testcase_23 AC 250 ms
41,172 KB
testcase_24 AC 409 ms
71,468 KB
testcase_25 AC 482 ms
71,572 KB
testcase_26 AC 938 ms
132,172 KB
testcase_27 AC 931 ms
132,168 KB
testcase_28 AC 668 ms
72,724 KB
testcase_29 AC 800 ms
77,972 KB
testcase_30 AC 1,121 ms
132,220 KB
testcase_31 AC 842 ms
132,244 KB
testcase_32 AC 362 ms
45,580 KB
testcase_33 AC 155 ms
27,332 KB
testcase_34 AC 467 ms
71,460 KB
testcase_35 AC 1,487 ms
137,520 KB
testcase_36 AC 289 ms
41,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n, k = map(int, input().split())
a = {0}; b = {0}
for i in range(n): a.add((i+1)*(i+2)//2); b.add((i+1)*(2*n-i)//2)
for v in a:
    if k-v in b: print(1); break
else: print(2)
0