結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー poeMoonpoeMoon
提出日時 2023-12-02 18:14:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 270 ms / 2,000 ms
コード長 268 bytes
コンパイル時間 643 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 76,996 KB
最終ジャッジ日時 2023-12-02 18:14:26
合計ジャッジ時間 4,011 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
53,332 KB
testcase_01 AC 53 ms
68,640 KB
testcase_02 AC 54 ms
69,296 KB
testcase_03 AC 48 ms
67,156 KB
testcase_04 AC 55 ms
69,464 KB
testcase_05 AC 51 ms
70,168 KB
testcase_06 AC 268 ms
76,996 KB
testcase_07 AC 267 ms
76,996 KB
testcase_08 AC 270 ms
76,848 KB
testcase_09 AC 263 ms
76,860 KB
testcase_10 AC 266 ms
76,996 KB
testcase_11 AC 35 ms
53,332 KB
testcase_12 AC 39 ms
59,504 KB
testcase_13 AC 36 ms
53,332 KB
testcase_14 AC 35 ms
53,332 KB
testcase_15 AC 41 ms
59,504 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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