結果

問題 No.2142 Segment Zero
ユーザー vltmttvltmtt
提出日時 2022-12-02 22:38:43
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 152 bytes
コンパイル時間 381 ms
コンパイル使用メモリ 82,852 KB
実行使用メモリ 226,440 KB
最終ジャッジ日時 2024-04-18 07:29:37
合計ジャッジ時間 8,017 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
52,856 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 254 ms
225,256 KB
testcase_05 AC 262 ms
226,440 KB
testcase_06 AC 37 ms
52,836 KB
testcase_07 WA -
testcase_08 AC 232 ms
224,844 KB
testcase_09 WA -
testcase_10 AC 247 ms
226,184 KB
testcase_11 AC 248 ms
225,504 KB
testcase_12 AC 246 ms
225,104 KB
testcase_13 AC 248 ms
225,616 KB
testcase_14 AC 257 ms
225,972 KB
testcase_15 AC 228 ms
225,240 KB
testcase_16 AC 216 ms
224,952 KB
testcase_17 AC 212 ms
194,236 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 143 ms
149,244 KB
testcase_21 WA -
testcase_22 AC 177 ms
180,412 KB
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 AC 123 ms
132,916 KB
testcase_29 AC 121 ms
149,628 KB
testcase_30 AC 173 ms
181,600 KB
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 AC 197 ms
224,708 KB
testcase_36 AC 79 ms
94,088 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int,input().split())
se=set([0])
kk=(n+1)*n//2-k
x=0
for i in range(1,n+1):
  x+=i
  se.add(x)
  if kk+x in se:
    print(1)
    exit()
print(2)
0