結果
| 問題 | No.1243 約数加算 |
| コンテスト | |
| ユーザー |
yuusanlondon
|
| 提出日時 | 2020-10-02 21:44:45 |
| 言語 | PyPy3 (8.0.1 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 40 ms / 2,000 ms |
| + 955µs | |
| コード長 | 372 bytes |
| 記録 | |
| コンパイル時間 | 79 ms |
| コンパイル使用メモリ | 64,424 KB |
| 実行使用メモリ | 58,640 KB |
| 最終ジャッジ日時 | 2026-10-31 13:07:29 |
| 合計ジャッジ時間 | 1,810 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 11 |
ソースコード
import os,io
input=io.BytesIO(os.read(0,os.fstat(0).st_size)).readline
t=int(input())
for _ in range(t):
a,b=map(int,input().split())
ans=[]
for i in range(70):
if a+(1<<i)<=b and a&(1<<i):
ans.append(str(1<<i))
a+=1<<i
for i in range(69,-1,-1):
if a+(1<<i)<=b:
ans.append(str(1<<i))
a+=1<<i
print(len(ans))
print(' '.join(ans))
yuusanlondon