結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
9,728 KB
testcase_01 AC 126 ms
17,360 KB
testcase_02 AC 142 ms
16,532 KB
testcase_03 AC 125 ms
18,480 KB
testcase_04 AC 142 ms
19,468 KB
testcase_05 AC 150 ms
20,664 KB
testcase_06 AC 562 ms
9,856 KB
testcase_07 AC 598 ms
9,856 KB
testcase_08 AC 593 ms
9,856 KB
testcase_09 AC 599 ms
9,856 KB
testcase_10 AC 566 ms
9,856 KB
testcase_11 AC 29 ms
9,728 KB
testcase_12 AC 27 ms
9,856 KB
testcase_13 AC 27 ms
9,856 KB
testcase_14 AC 26 ms
9,728 KB
testcase_15 AC 24 ms
9,856 KB
testcase_16 AC 25 ms
9,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a=int(input())
for i in range(a):
	b,c=map(int,input().split())
	if c<((b+1)*b)//2:
		print(-1)
		continue
	d=c-((b+1)*b)//2
	n=d//b
	ans=[j+n+1 for j in range(b)]
	l=d%b
	for j in range(-1,-l-1,-1):
	    ans[j]+=1
	ans=ans[::-1]
	print(*ans)
0