結果

問題 No.2567 A_1 > A_2 > ... > A_N
ユーザー 👑 timitimi
提出日時 2023-12-02 15:35:26
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 326 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 194 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,316 KB
最終ジャッジ日時 2023-12-02 15:35:31
合計ジャッジ時間 4,538 ms
ジャッジサーバーID
(参考情報)
judge10 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,460 KB
testcase_01 AC 89 ms
80,256 KB
testcase_02 AC 95 ms
82,460 KB
testcase_03 AC 88 ms
81,176 KB
testcase_04 AC 94 ms
81,952 KB
testcase_05 AC 96 ms
83,316 KB
testcase_06 AC 319 ms
77,160 KB
testcase_07 AC 308 ms
76,412 KB
testcase_08 AC 326 ms
77,172 KB
testcase_09 AC 302 ms
76,580 KB
testcase_10 AC 324 ms
77,420 KB
testcase_11 AC 40 ms
53,460 KB
testcase_12 AC 52 ms
65,024 KB
testcase_13 AC 43 ms
61,184 KB
testcase_14 AC 41 ms
59,532 KB
testcase_15 AC 50 ms
64,852 KB
testcase_16 AC 43 ms
61,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
for _ in range(N):
  x,y=map(int, input().split())
  A=[i for i in range(x,0,-1)]
  s=(1+x)*x//2 
  if s>y:
    print(-1)
  else:
    k=y-s
    for j in range(x):
      A[j]+=k//x 
      if j+1<=k%x:
        A[j]+=1 
    print(*A)
0