結果

問題 No.2567 A_1 > A_2 > ... > A_N
ユーザー sA_3sA_3
提出日時 2023-12-02 17:52:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 283 bytes
コンパイル時間 89 ms
コンパイル使用メモリ 11,648 KB
実行使用メモリ 19,732 KB
最終ジャッジ日時 2023-12-02 17:53:01
合計ジャッジ時間 3,973 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
9,984 KB
testcase_01 TLE -
testcase_02 -- -
testcase_03 -- -
testcase_04 -- -
testcase_05 -- -
testcase_06 -- -
testcase_07 -- -
testcase_08 -- -
testcase_09 -- -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
testcase_14 -- -
testcase_15 -- -
testcase_16 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
    N,X = map(int,input().split())
    if N*(N+1)//2 > X:
        print(-1)
    else:
        ans = [i for i in range(N,0,-1)]
        ct = 0
        while sum(ans) != X:
            ans[ct%N] += 1
            ct += 1
        print(*ans)

        
0