結果

問題 No.1243 約数加算
ユーザー persimmon-persimmonpersimmon-persimmon
提出日時 2021-06-15 14:33:03
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 109 ms / 2,000 ms
コード長 261 bytes
コンパイル時間 292 ms
コンパイル使用メモリ 86,756 KB
実行使用メモリ 77,512 KB
最終ジャッジ日時 2023-08-27 05:31:16
合計ジャッジ時間 2,257 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,144 KB
testcase_01 AC 74 ms
70,936 KB
testcase_02 AC 74 ms
71,192 KB
testcase_03 AC 74 ms
71,196 KB
testcase_04 AC 102 ms
76,580 KB
testcase_05 AC 92 ms
76,576 KB
testcase_06 AC 99 ms
76,724 KB
testcase_07 AC 94 ms
76,592 KB
testcase_08 AC 109 ms
77,512 KB
testcase_09 AC 72 ms
71,268 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

t=int(input())
ab=[list(map(int,input().split())) for _ in range(t)]
for a,b in ab:
	ary=[]
	now=1
	while b-a>0:
		while a%(2*now)==0:
			now*=2
		while a%now!=0:
			now//=2
		while b-a<now:
			now//=2
		a+=now
		ary.append(now)
	print(len(ary))
	print(*ary)


0