結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー nikoshonikosho
提出日時 2023-12-02 15:03:09
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 311 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 88,192 KB
最終ジャッジ日時 2023-12-02 15:03:17
合計ジャッジ時間 3,493 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
53,460 KB
testcase_01 AC 84 ms
83,104 KB
testcase_02 AC 92 ms
86,096 KB
testcase_03 AC 73 ms
88,192 KB
testcase_04 AC 76 ms
87,608 KB
testcase_05 AC 83 ms
87,952 KB
testcase_06 AC 267 ms
76,676 KB
testcase_07 AC 308 ms
77,796 KB
testcase_08 AC 253 ms
76,296 KB
testcase_09 AC 311 ms
77,796 KB
testcase_10 AC 294 ms
77,680 KB
testcase_11 AC 38 ms
58,840 KB
testcase_12 AC 47 ms
61,712 KB
testcase_13 AC 39 ms
58,840 KB
testcase_14 AC 35 ms
58,840 KB
testcase_15 AC 44 ms
62,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())

for i in range(t):
    n, x = map(int,input().split())
    if x >= sum(range(1, n + 1)):
        j = 1
        ans = []
        while n>1:
            ans.append(j)
            x-=j
            j+=1
            n-=1
        ans.append(x)
        print(*ans)
    else:
        print(-1)
0