結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー OhnoHirokiOhnoHiroki
提出日時 2024-04-13 19:28:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 680 ms / 2,000 ms
コード長 214 bytes
コンパイル時間 431 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 18,508 KB
最終ジャッジ日時 2024-04-13 19:28:08
合計ジャッジ時間 6,779 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
10,880 KB
testcase_01 AC 128 ms
15,968 KB
testcase_02 AC 208 ms
15,872 KB
testcase_03 AC 124 ms
17,536 KB
testcase_04 AC 146 ms
18,084 KB
testcase_05 AC 148 ms
18,508 KB
testcase_06 AC 582 ms
10,880 KB
testcase_07 AC 680 ms
10,752 KB
testcase_08 AC 599 ms
10,752 KB
testcase_09 AC 669 ms
10,752 KB
testcase_10 AC 594 ms
10,752 KB
testcase_11 AC 30 ms
10,752 KB
testcase_12 AC 31 ms
10,880 KB
testcase_13 AC 30 ms
10,752 KB
testcase_14 AC 31 ms
10,752 KB
testcase_15 AC 33 ms
10,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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