結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー KoiKoi
提出日時 2023-12-02 15:48:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 188 ms / 2,000 ms
コード長 369 bytes
コンパイル時間 582 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 92,072 KB
最終ジャッジ日時 2023-12-02 15:48:52
合計ジャッジ時間 3,512 ms
ジャッジサーバーID
(参考情報)
judge11 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 80 ms
86,724 KB
testcase_02 AC 90 ms
89,348 KB
testcase_03 AC 80 ms
89,908 KB
testcase_04 AC 82 ms
87,900 KB
testcase_05 AC 86 ms
92,072 KB
testcase_06 AC 188 ms
85,624 KB
testcase_07 AC 185 ms
85,188 KB
testcase_08 AC 183 ms
85,232 KB
testcase_09 AC 187 ms
85,524 KB
testcase_10 AC 181 ms
85,524 KB
testcase_11 AC 39 ms
53,460 KB
testcase_12 AC 45 ms
59,600 KB
testcase_13 AC 40 ms
53,460 KB
testcase_14 AC 38 ms
53,460 KB
testcase_15 AC 49 ms
62,344 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
answers=[]
for _ in range(T):
    N,X=map(int,input().split())
    ans=[]
    if(X<N*(N+1)//2):
        answers.append([-1])
    else:
        for i in range(N):
            if(i==N-1):
                ans.append(X)
            else:
                ans.append(i+1)
                X-=(i+1)
        answers.append(ans)
for ans in answers:
    print(*ans)
0