結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー ymsksky
提出日時 2024-04-09 22:43:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 198 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 705 ms
コンパイル使用メモリ 82,360 KB
実行使用メモリ 87,104 KB
最終ジャッジ日時 2024-10-01 23:17:19
合計ジャッジ時間 3,570 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

ans = []
t = int(input())
for _ in range(t):
    n, x = map(int, input().split())
    # 1 ~ (n - 1)の和
    s = n * (n - 1) // 2
    if x - s < n:
        res = [-1]
    else:
        res = list(range(1, n)) + [x - s]
    ans.append(res)
for an in ans:
    print(*an)
0