結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー かもめのうでかもめのうで
提出日時 2023-12-02 15:06:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 196 ms / 2,000 ms
コード長 384 bytes
コンパイル時間 583 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 90,392 KB
最終ジャッジ日時 2023-12-02 15:06:36
合計ジャッジ時間 3,491 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 83 ms
84,416 KB
testcase_02 AC 92 ms
87,284 KB
testcase_03 AC 83 ms
89,932 KB
testcase_04 AC 88 ms
90,392 KB
testcase_05 AC 92 ms
89,272 KB
testcase_06 AC 194 ms
81,384 KB
testcase_07 AC 189 ms
81,384 KB
testcase_08 AC 182 ms
81,384 KB
testcase_09 AC 195 ms
81,384 KB
testcase_10 AC 196 ms
81,384 KB
testcase_11 AC 51 ms
73,600 KB
testcase_12 AC 57 ms
75,880 KB
testcase_13 AC 52 ms
73,936 KB
testcase_14 AC 50 ms
73,304 KB
testcase_15 AC 61 ms
76,416 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
N = []
X = []
for _ in range(t):
    n, x = map(int, input().split())
    N.append(n)
    X.append(x)
for j in range(t):
    n = N[j]
    x = X[j]
    if n == 1:
        print(x)
        continue
    ans = []
    for i in range(1, n):
        ans.append(i)
    sum_ans = sum(ans)
    if x-sum_ans <= ans[-1]:
        print(-1)
    else:
        print(*ans, x-sum_ans)
0