結果

問題 No.2560 A_1 < A_2 < ... < A_N
ユーザー 👑 timitimi
提出日時 2023-12-02 14:35:46
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 295 ms / 2,000 ms
コード長 178 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 83,156 KB
最終ジャッジ日時 2023-12-02 14:36:28
合計ジャッジ時間 3,675 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,460 KB
testcase_01 AC 71 ms
79,708 KB
testcase_02 AC 70 ms
82,192 KB
testcase_03 AC 66 ms
81,096 KB
testcase_04 AC 72 ms
81,760 KB
testcase_05 AC 75 ms
83,156 KB
testcase_06 AC 295 ms
77,024 KB
testcase_07 AC 282 ms
76,872 KB
testcase_08 AC 289 ms
77,152 KB
testcase_09 AC 280 ms
77,132 KB
testcase_10 AC 292 ms
76,760 KB
testcase_11 AC 39 ms
59,376 KB
testcase_12 AC 41 ms
61,720 KB
testcase_13 AC 46 ms
59,700 KB
testcase_14 AC 38 ms
59,248 KB
testcase_15 AC 45 ms
64,588 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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