#include<iostream>
#include<vector>
#include<cmath>
#include<string>
#include<string.h>
#include<algorithm>
#include<set>
#include<queue>
#include<map>
using namespace std;
#define ll long long
const int maxn = 1e5+9;
signed main()
{
int t;
scanf("%d",&t);
while(t--)
{
ll l,r;
scanf("%lld%lld",&l,&r);
for(ll i=1;(l|i)<=r;i<<=1) l |= i;
printf("%lld\n",l);
}
return 0;
}
Bits CodeForces - 484A
最新推荐文章于 2024-09-09 22:12:12 发布