結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー loop0919loop0919
提出日時 2023-11-14 10:56:11
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 261 ms / 2,000 ms
コード長 285 bytes
コンパイル時間 403 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,936 KB
最終ジャッジ日時 2023-11-18 15:30:40
合計ジャッジ時間 3,452 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 68 ms
80,380 KB
testcase_02 AC 74 ms
83,120 KB
testcase_03 AC 65 ms
81,908 KB
testcase_04 AC 69 ms
83,080 KB
testcase_05 AC 73 ms
83,936 KB
testcase_06 AC 261 ms
77,276 KB
testcase_07 AC 245 ms
76,764 KB
testcase_08 AC 259 ms
76,872 KB
testcase_09 AC 254 ms
76,500 KB
testcase_10 AC 255 ms
77,140 KB
testcase_11 AC 34 ms
53,460 KB
testcase_12 AC 38 ms
59,324 KB
testcase_13 AC 34 ms
53,460 KB
testcase_14 AC 32 ms
53,460 KB
testcase_15 AC 41 ms
62,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def sigma(num):
    return num * (num + 1) // 2


def solve():
    N, X = map(int, input().split())
    if sigma(N) > X:
        print(-1)
    else:
        ans = list(range(1, N))
        ans.append(X - sigma(N-1))
        print(*ans)


T = int(input())
for _ in range(T):
    solve()
0