結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー ymskskyymsksky
提出日時 2024-04-09 22:43:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 209 ms / 2,000 ms
コード長 270 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 82,376 KB
実行使用メモリ 86,772 KB
最終ジャッジ日時 2024-04-09 22:43:34
合計ジャッジ時間 3,943 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
51,812 KB
testcase_01 AC 76 ms
82,504 KB
testcase_02 AC 82 ms
83,532 KB
testcase_03 AC 76 ms
84,580 KB
testcase_04 AC 83 ms
85,388 KB
testcase_05 AC 83 ms
85,064 KB
testcase_06 AC 209 ms
86,552 KB
testcase_07 AC 206 ms
86,476 KB
testcase_08 AC 201 ms
86,720 KB
testcase_09 AC 199 ms
86,772 KB
testcase_10 AC 204 ms
86,124 KB
testcase_11 AC 41 ms
53,908 KB
testcase_12 AC 48 ms
59,432 KB
testcase_13 AC 40 ms
52,912 KB
testcase_14 AC 40 ms
53,996 KB
testcase_15 AC 48 ms
62,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ans = []
t = int(input())
for _ in range(t):
    n, x = map(int, input().split())
    # 1 ~ (n - 1)の和
    s = n * (n - 1) // 2
    if x - s < n:
        res = [-1]
    else:
        res = list(range(1, n)) + [x - s]
    ans.append(res)
for an in ans:
    print(*an)
0