#include #include #include using namespace std; typedef long long int64; const int kMod = 1e9+7; int64 count(int64 x, int64 y, int bit) { if (x == y) { if (x != 0) return 1; return 0; } int64 ans = 0; if (x < (1LL<= (1LL<> q; for (int i = 1; i <= q; ++i) { int x, y; cin >> x >> y; // cout << x << " " << y << "\n"; int64 ans = count(x, y, 30); ans %= kMod; cout << ans << "\n"; } } int main() { int test = 1; for (;test; --test) { solve(); } }