結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー prd_xxxprd_xxx
提出日時 2023-12-02 14:39:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 292 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 247 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,188 KB
最終ジャッジ日時 2023-12-02 14:39:25
合計ジャッジ時間 3,488 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,460 KB
testcase_01 AC 63 ms
79,744 KB
testcase_02 AC 67 ms
82,224 KB
testcase_03 AC 67 ms
80,988 KB
testcase_04 AC 70 ms
81,780 KB
testcase_05 AC 73 ms
83,188 KB
testcase_06 AC 269 ms
76,884 KB
testcase_07 AC 292 ms
77,268 KB
testcase_08 AC 267 ms
77,268 KB
testcase_09 AC 263 ms
76,888 KB
testcase_10 AC 274 ms
77,132 KB
testcase_11 AC 38 ms
59,520 KB
testcase_12 AC 40 ms
61,860 KB
testcase_13 AC 40 ms
59,792 KB
testcase_14 AC 37 ms
59,388 KB
testcase_15 AC 44 ms
64,608 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve(N,X):
    ans = [i for i in range(1,N+1)]
    sa = sum(ans)
    if sa > X:
        print(-1)
    else:
        ans[-1] += X - sa
        print(*ans)

T = int(input())
for _ in range(T):
    N,X = map(int,input().split())
    solve(N,X)
0