結果

問題 No.2567 A_1 > A_2 > ... > A_N
ユーザー anonymouslyanonymously
提出日時 2023-12-09 18:02:09
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 585 ms / 2,000 ms
コード長 186 bytes
コンパイル時間 87 ms
コンパイル使用メモリ 11,776 KB
実行使用メモリ 17,664 KB
最終ジャッジ日時 2023-12-09 18:02:17
合計ジャッジ時間 5,766 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
9,984 KB
testcase_01 AC 127 ms
15,104 KB
testcase_02 AC 136 ms
15,880 KB
testcase_03 AC 120 ms
17,664 KB
testcase_04 AC 151 ms
17,100 KB
testcase_05 AC 143 ms
17,028 KB
testcase_06 AC 539 ms
9,984 KB
testcase_07 AC 568 ms
9,984 KB
testcase_08 AC 551 ms
9,984 KB
testcase_09 AC 585 ms
9,984 KB
testcase_10 AC 547 ms
9,984 KB
testcase_11 AC 28 ms
9,984 KB
testcase_12 AC 27 ms
10,112 KB
testcase_13 AC 27 ms
10,112 KB
testcase_14 AC 27 ms
9,984 KB
testcase_15 AC 28 ms
10,112 KB
testcase_16 AC 28 ms
10,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

T=int(input())
for _ in range(T):
	n,x=map(int,input().split())
	s=n*(n+1)//2
	if x<s:
		print(-1)
	else:
		p=x-s
		q=p//n
		r=p%n
		print(*[(n-i)+q+(1 if i<r else 0) for i in range(n)])
0