結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー n_nan_na
提出日時 2024-01-02 09:19:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 317 ms / 2,000 ms
コード長 301 bytes
コンパイル時間 353 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 88,172 KB
最終ジャッジ日時 2024-01-02 09:19:12
合計ジャッジ時間 4,158 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,460 KB
testcase_01 AC 78 ms
83,216 KB
testcase_02 AC 82 ms
86,088 KB
testcase_03 AC 76 ms
88,172 KB
testcase_04 AC 109 ms
87,844 KB
testcase_05 AC 84 ms
87,940 KB
testcase_06 AC 260 ms
76,208 KB
testcase_07 AC 293 ms
76,904 KB
testcase_08 AC 317 ms
77,236 KB
testcase_09 AC 306 ms
77,132 KB
testcase_10 AC 292 ms
76,888 KB
testcase_11 AC 48 ms
73,724 KB
testcase_12 AC 55 ms
75,748 KB
testcase_13 AC 48 ms
74,060 KB
testcase_14 AC 47 ms
73,428 KB
testcase_15 AC 57 ms
76,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

for _ in range(T):
    N,X = map(int,input().split())
    s = 0
    P = []
    for i in range(N-1):
        P.append(i+1)
        s += (i+1)
    r = X - s
    if len(P) == 0:
        print(X)
    elif r > P[-1]:
        P.append(r)
        print(*P)
    else:
        print(-1)

    
0