結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー 👑 H20H20
提出日時 2023-12-02 14:49:43
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 306 ms / 2,000 ms
コード長 256 bytes
コンパイル時間 330 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 88,172 KB
最終ジャッジ日時 2023-12-02 14:49:50
合計ジャッジ時間 3,660 ms
ジャッジサーバーID
(参考情報)
judge9 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
53,460 KB
testcase_01 AC 82 ms
83,268 KB
testcase_02 AC 92 ms
85,944 KB
testcase_03 AC 84 ms
88,172 KB
testcase_04 AC 88 ms
87,716 KB
testcase_05 AC 93 ms
87,868 KB
testcase_06 AC 300 ms
76,552 KB
testcase_07 AC 293 ms
76,448 KB
testcase_08 AC 306 ms
76,960 KB
testcase_09 AC 293 ms
76,360 KB
testcase_10 AC 297 ms
76,832 KB
testcase_11 AC 47 ms
61,588 KB
testcase_12 AC 46 ms
61,700 KB
testcase_13 AC 43 ms
59,508 KB
testcase_14 AC 45 ms
61,588 KB
testcase_15 AC 49 ms
64,308 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for _ in range(T):
    N,X = map(int, input().split())
    ANS = []
    i = 1
    while len(ANS)<N and X>=i:
        ANS.append(i)
        X-=i
        i+=1
    ANS[-1]+=X
    if len(ANS)==N:
        print(*ANS)
    else:
        print(-1)
0