結果

問題 No.2142 Segment Zero
ユーザー vltmttvltmtt
提出日時 2022-12-02 22:39:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 260 ms / 2,000 ms
コード長 152 bytes
コンパイル時間 417 ms
コンパイル使用メモリ 82,476 KB
実行使用メモリ 226,004 KB
最終ジャッジ日時 2024-04-18 07:30:39
合計ジャッジ時間 7,130 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,852 KB
testcase_01 AC 256 ms
226,004 KB
testcase_02 AC 37 ms
52,656 KB
testcase_03 AC 36 ms
52,904 KB
testcase_04 AC 250 ms
225,384 KB
testcase_05 AC 257 ms
224,928 KB
testcase_06 AC 38 ms
52,548 KB
testcase_07 AC 95 ms
103,052 KB
testcase_08 AC 254 ms
225,932 KB
testcase_09 AC 169 ms
160,396 KB
testcase_10 AC 254 ms
225,092 KB
testcase_11 AC 252 ms
225,596 KB
testcase_12 AC 260 ms
225,736 KB
testcase_13 AC 250 ms
225,396 KB
testcase_14 AC 257 ms
225,828 KB
testcase_15 AC 257 ms
225,108 KB
testcase_16 AC 245 ms
225,520 KB
testcase_17 AC 217 ms
194,916 KB
testcase_18 AC 47 ms
63,216 KB
testcase_19 AC 65 ms
79,772 KB
testcase_20 AC 155 ms
150,512 KB
testcase_21 AC 125 ms
131,284 KB
testcase_22 AC 200 ms
181,684 KB
testcase_23 AC 80 ms
91,860 KB
testcase_24 AC 100 ms
108,400 KB
testcase_25 AC 77 ms
90,264 KB
testcase_26 AC 143 ms
140,784 KB
testcase_27 AC 86 ms
103,424 KB
testcase_28 AC 130 ms
132,672 KB
testcase_29 AC 143 ms
150,812 KB
testcase_30 AC 176 ms
179,916 KB
testcase_31 AC 44 ms
62,564 KB
testcase_32 AC 92 ms
98,000 KB
testcase_33 AC 64 ms
77,356 KB
testcase_34 AC 90 ms
98,432 KB
testcase_35 AC 259 ms
224,920 KB
testcase_36 AC 80 ms
94,384 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 x-kk in se:
    print(1)
    exit()
print(2)
0