結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー manabeaimanabeai
提出日時 2023-12-03 06:27:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 289 ms / 2,000 ms
コード長 299 bytes
コンパイル時間 362 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 77,132 KB
最終ジャッジ日時 2023-12-03 06:27:30
合計ジャッジ時間 3,710 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,332 KB
testcase_01 AC 71 ms
75,696 KB
testcase_02 AC 73 ms
75,824 KB
testcase_03 AC 72 ms
75,696 KB
testcase_04 AC 71 ms
75,696 KB
testcase_05 AC 70 ms
75,824 KB
testcase_06 AC 287 ms
76,912 KB
testcase_07 AC 279 ms
76,528 KB
testcase_08 AC 289 ms
77,132 KB
testcase_09 AC 284 ms
77,084 KB
testcase_10 AC 259 ms
76,980 KB
testcase_11 AC 36 ms
53,332 KB
testcase_12 AC 42 ms
58,940 KB
testcase_13 AC 36 ms
53,332 KB
testcase_14 AC 35 ms
53,332 KB
testcase_15 AC 44 ms
62,340 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())

for i in range(t):
    n, x = map(int,input().split())
    if x-(n*(n-1) //2)  < n:
        print(-1)
        continue
    else:
        if n > 1:
            for j in range(1,n):
                print(j,end=" ")
            print(x-(j*(j+1))//2)
        else:
            print(x)
0