結果

問題 No.1243 約数加算
ユーザー naniwazunaniwazu
提出日時 2020-10-02 21:50:33
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 249 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 79,496 KB
最終ジャッジ日時 2023-09-23 04:43:20
合計ジャッジ時間 4,029 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
for i in range(T):
    A,B = map(int,input().split())
    ans = []
    while A < B:
        x = 1
        while A+2*x <= B and A % (2*x) == 0:
            x *= 2
        ans.append(x)
        A += x
    print(len(A))
    print(*ans)
0