結果
| 問題 | No.1244 Black Segment |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-02-24 16:15:05 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 386 bytes |
| 記録 | |
| コンパイル時間 | 175 ms |
| コンパイル使用メモリ | 85,632 KB |
| 実行使用メモリ | 65,280 KB |
| 最終ジャッジ日時 | 2026-04-11 20:32:00 |
| 合計ジャッジ時間 | 4,678 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)