結果
問題 |
No.1244 Black Segment
|
ユーザー |
|
提出日時 | 2021-02-24 16:15:05 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 386 bytes |
コンパイル時間 | 280 ms |
コンパイル使用メモリ | 82,224 KB |
実行使用メモリ | 67,304 KB |
最終ジャッジ日時 | 2024-09-24 17:18:11 |
合計ジャッジ時間 | 5,087 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | RE * 3 |
other | RE * 36 |
ソースコード
import sys sys.setrecursionlimit(10**7) def main(a,b): if b==a:return [] if 2*a<=b: ret=[a]+main(2*a,b) return ret d=1 while a+2*d<=b and a%(2*d)==0: d*=2 ary=[d]+main(a+d,b) return ary if __name__=='__main__': t=int(input()) cases=[list(map(int,input().split())) for _ in range(t)] for a,b in cases: ret=main(a,b) print(len(ret)) print(*ret)