結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー K5h1n0K5h1n0
提出日時 2023-12-02 14:55:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 216 ms / 2,000 ms
コード長 372 bytes
コンパイル時間 166 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 92,064 KB
最終ジャッジ日時 2023-12-02 14:55:48
合計ジャッジ時間 3,104 ms
ジャッジサーバーID
(参考情報)
judge15 / judge9
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 81 ms
86,716 KB
testcase_02 AC 86 ms
89,340 KB
testcase_03 AC 84 ms
89,900 KB
testcase_04 AC 82 ms
87,892 KB
testcase_05 AC 87 ms
92,064 KB
testcase_06 AC 216 ms
85,392 KB
testcase_07 AC 184 ms
85,200 KB
testcase_08 AC 186 ms
85,244 KB
testcase_09 AC 179 ms
85,520 KB
testcase_10 AC 180 ms
85,520 KB
testcase_11 AC 37 ms
53,460 KB
testcase_12 AC 45 ms
59,632 KB
testcase_13 AC 38 ms
53,460 KB
testcase_14 AC 39 ms
53,460 KB
testcase_15 AC 52 ms
62,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
ans = []
for _ in range(t):
    n,x = map(int,input().split())
    nowlist = []
    if n*(n+1)//2 <= x:
        for i in range(1,n+1):
            if i == n:
                nowlist.append(x)
            else:
                x -= i
                nowlist.append(i)
    else:
        nowlist.append(-1)
    ans.append(nowlist)
for i in ans:
    print(*i)
0