結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー manabeai
提出日時 2023-12-03 06:27:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 297 ms / 2,000 ms
コード長 299 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 77,700 KB
最終ジャッジ日時 2024-09-26 22:01:50
合計ジャッジ時間 3,903 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 15
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())

for i in range(t):
    n, x = map(int,input().split())
    if x-(n*(n-1) //2)  < n:
        print(-1)
        continue
    else:
        if n > 1:
            for j in range(1,n):
                print(j,end=" ")
            print(x-(j*(j+1))//2)
        else:
            print(x)
0