結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
53,460 KB
testcase_01 AC 65 ms
80,368 KB
testcase_02 AC 74 ms
83,112 KB
testcase_03 AC 67 ms
81,908 KB
testcase_04 AC 69 ms
83,080 KB
testcase_05 AC 70 ms
83,944 KB
testcase_06 AC 260 ms
77,276 KB
testcase_07 AC 252 ms
76,764 KB
testcase_08 AC 262 ms
76,872 KB
testcase_09 AC 252 ms
76,500 KB
testcase_10 AC 252 ms
77,268 KB
testcase_11 AC 33 ms
53,460 KB
testcase_12 AC 37 ms
59,336 KB
testcase_13 AC 33 ms
53,460 KB
testcase_14 AC 33 ms
53,460 KB
testcase_15 AC 40 ms
62,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())

# 1以上n以下の整数の総和
def sigma(num):
    return num * (num + 1) // 2

for _ in range(T):
    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)
0