結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
51,840 KB
testcase_01 WA -
testcase_02 AC 37 ms
51,584 KB
testcase_03 AC 36 ms
52,096 KB
testcase_04 AC 263 ms
224,768 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 147 ms
148,864 KB
testcase_10 AC 257 ms
224,256 KB
testcase_11 AC 254 ms
224,640 KB
testcase_12 AC 267 ms
224,512 KB
testcase_13 WA -
testcase_14 AC 262 ms
224,640 KB
testcase_15 AC 271 ms
224,256 KB
testcase_16 AC 270 ms
224,768 KB
testcase_17 AC 238 ms
193,536 KB
testcase_18 AC 50 ms
63,104 KB
testcase_19 WA -
testcase_20 AC 158 ms
149,120 KB
testcase_21 WA -
testcase_22 AC 217 ms
180,096 KB
testcase_23 AC 72 ms
79,360 KB
testcase_24 WA -
testcase_25 AC 76 ms
82,176 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 AC 84 ms
87,040 KB
testcase_33 WA -
testcase_34 AC 93 ms
93,568 KB
testcase_35 WA -
testcase_36 AC 91 ms
94,080 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
  if kk-x in se:
    print(1)
    exit()
  se.add(x)
print(2)
0