結果

問題 No.2567 A_1 > A_2 > ... > A_N
ユーザー あ
提出日時 2023-12-14 01:09:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 340 ms / 2,000 ms
コード長 301 bytes
コンパイル時間 243 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,436 KB
最終ジャッジ日時 2023-12-14 01:09:38
合計ジャッジ時間 4,669 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,460 KB
testcase_01 AC 79 ms
80,116 KB
testcase_02 AC 84 ms
82,460 KB
testcase_03 AC 79 ms
81,120 KB
testcase_04 AC 83 ms
81,936 KB
testcase_05 AC 86 ms
83,436 KB
testcase_06 AC 335 ms
77,256 KB
testcase_07 AC 327 ms
77,132 KB
testcase_08 AC 320 ms
77,380 KB
testcase_09 AC 340 ms
77,728 KB
testcase_10 AC 331 ms
77,520 KB
testcase_11 AC 39 ms
53,460 KB
testcase_12 AC 47 ms
62,480 KB
testcase_13 AC 38 ms
53,460 KB
testcase_14 AC 36 ms
53,460 KB
testcase_15 AC 46 ms
62,220 KB
testcase_16 AC 39 ms
53,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t = int(input())
for _ in range(t):
    n, x = map(int, input().split())
    
    mi = (n + 1) * n // 2
    if mi > x:
        print(-1)
        continue
    ave = (x - mi) // n
    rem = (x - mi) % n
    ans = list(range(n + ave, ave, -1))
    for i in range(rem):
        ans[i] += 1
    print(*ans)
0