結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,612 KB
testcase_01 AC 75 ms
85,104 KB
testcase_02 AC 84 ms
88,072 KB
testcase_03 AC 76 ms
90,744 KB
testcase_04 AC 81 ms
90,440 KB
testcase_05 AC 85 ms
89,680 KB
testcase_06 AC 169 ms
81,680 KB
testcase_07 AC 167 ms
81,744 KB
testcase_08 AC 160 ms
81,424 KB
testcase_09 AC 169 ms
81,736 KB
testcase_10 AC 175 ms
81,948 KB
testcase_11 AC 46 ms
74,840 KB
testcase_12 AC 51 ms
75,832 KB
testcase_13 AC 50 ms
74,408 KB
testcase_14 AC 48 ms
74,152 KB
testcase_15 AC 57 ms
76,540 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