結果

問題 No.1243 約数加算
ユーザー NatsubiSoganNatsubiSogan
提出日時 2020-10-04 14:47:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 210 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 10,508 KB
実行使用メモリ 7,860 KB
最終ジャッジ日時 2023-09-26 21:39:22
合計ジャッジ時間 1,491 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,808 KB
testcase_01 AC 15 ms
7,792 KB
testcase_02 AC 15 ms
7,812 KB
testcase_03 AC 15 ms
7,748 KB
testcase_04 AC 19 ms
7,732 KB
testcase_05 AC 23 ms
7,840 KB
testcase_06 AC 24 ms
7,768 KB
testcase_07 AC 19 ms
7,860 KB
testcase_08 AC 23 ms
7,788 KB
testcase_09 AC 15 ms
7,792 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,L,P=input,len,print
t=int(I())
for _ in range(t):
 a,b=map(int,I().split());l,r,C=[],[],0
 while a<b:
  if a%2:l.append(2**C);a+=1
  if b%2:r.append(2**C);b-=1
  a//=2;b//=2;C+=1
 P(L(l)+L(r));P(*(l+r[::-1]))
0