結果
| 問題 | No.3624 Product |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2026-08-14 22:19:47 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 352 bytes |
| 記録 | |
| コンパイル時間 | 490 ms |
| コンパイル使用メモリ | 21,416 KB |
| 実行使用メモリ | 15,932 KB |
| 最終ジャッジ日時 | 2026-08-14 22:19:57 |
| 合計ジャッジ時間 | 9,347 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 7 WA * 5 |
ソースコード
import sys
input = sys.stdin.readline
T=int(input())
for tests in range(T):
L,R=list(map(int,input().split()))
y=-1
for i in range(40):
x=2**i
if L<=x<=R:
y=x
if y==-1:
print(-1)
else:
if L<=y-1<=R:
ANS=y*(y-1)
else:
ANS=-1
print(ANS)
titia