結果

問題 No.2567 A_1 > A_2 > ... > A_N
ユーザー NullzNullz
提出日時 2023-12-02 15:21:53
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 325 ms / 2,000 ms
コード長 303 bytes
コンパイル時間 466 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,292 KB
最終ジャッジ日時 2023-12-02 15:21:58
合計ジャッジ時間 4,434 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,332 KB
testcase_01 AC 83 ms
80,228 KB
testcase_02 AC 88 ms
82,340 KB
testcase_03 AC 86 ms
81,168 KB
testcase_04 AC 88 ms
81,676 KB
testcase_05 AC 91 ms
83,292 KB
testcase_06 AC 325 ms
76,616 KB
testcase_07 AC 314 ms
77,088 KB
testcase_08 AC 298 ms
76,576 KB
testcase_09 AC 304 ms
76,320 KB
testcase_10 AC 305 ms
76,644 KB
testcase_11 AC 40 ms
53,332 KB
testcase_12 AC 48 ms
62,344 KB
testcase_13 AC 40 ms
53,332 KB
testcase_14 AC 37 ms
53,332 KB
testcase_15 AC 48 ms
62,348 KB
testcase_16 AC 40 ms
53,332 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

for _ in range(int(input())):
    n, x = map(int, input().split())
    if (1 + n) * n // 2 > x:
        print(-1)
    else:
        v = x - (1 + n) * n // 2
        k = v // n
        r = v % n
        ans = [0] * n
        for i in range(n):
            ans[i] = n - i + k + (i < r)
        print(*ans)
0