結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー ゼットゼット
提出日時 2023-12-20 23:37:59
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 330 ms / 2,000 ms
コード長 216 bytes
コンパイル時間 313 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,312 KB
最終ジャッジ日時 2023-12-20 23:38:05
合計ジャッジ時間 4,830 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 73 ms
79,868 KB
testcase_02 AC 76 ms
82,356 KB
testcase_03 AC 73 ms
81,108 KB
testcase_04 AC 76 ms
81,848 KB
testcase_05 AC 79 ms
83,312 KB
testcase_06 AC 270 ms
76,216 KB
testcase_07 AC 308 ms
77,032 KB
testcase_08 AC 330 ms
77,240 KB
testcase_09 AC 316 ms
77,152 KB
testcase_10 AC 298 ms
77,016 KB
testcase_11 AC 38 ms
53,460 KB
testcase_12 AC 42 ms
59,708 KB
testcase_13 AC 38 ms
53,460 KB
testcase_14 AC 36 ms
53,460 KB
testcase_15 AC 46 ms
62,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

Q=int(input())
for _ in range(Q):
  N,X=map(int,input().split())
  y=N*(N+1)//2
  if y>X:
    print(-1)
    continue
  result=[0]*N
  for i in range(N-1):
    result[i]=i+1
    X-=i+1
  result[N-1]=X
  print(*result)
0