結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー anastaanasta
提出日時 2024-01-11 14:57:57
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 605 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 211 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 9,984 KB
最終ジャッジ日時 2024-01-11 14:58:03
合計ジャッジ時間 5,650 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
9,856 KB
testcase_01 AC 138 ms
9,984 KB
testcase_02 AC 159 ms
9,984 KB
testcase_03 AC 169 ms
9,984 KB
testcase_04 AC 161 ms
9,984 KB
testcase_05 AC 167 ms
9,984 KB
testcase_06 AC 594 ms
9,856 KB
testcase_07 AC 605 ms
9,856 KB
testcase_08 AC 597 ms
9,856 KB
testcase_09 AC 601 ms
9,856 KB
testcase_10 AC 593 ms
9,856 KB
testcase_11 AC 31 ms
9,856 KB
testcase_12 AC 30 ms
9,984 KB
testcase_13 AC 30 ms
9,856 KB
testcase_14 AC 29 ms
9,856 KB
testcase_15 AC 31 ms
9,984 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

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

    if (N + 1) * N / 2 <= X :
        for i in range(1, N):
            print(i,end=' ')
        print(int(X - int((N - 1) * N / 2)))
    else:
        print(-1)
0