{"problem":{"name":"Coincidence","description":{"content":"Given are integers $L$ and $R$. Find the number, modulo $10^9 + 7$, of pairs of integers $(x, y)$ $(L \\leq x \\leq y \\leq R)$ such that the remainder when $y$ is divided by $x$ is equal to $y \\text{ XO","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc138_f"},"statements":[{"statement_type":"Markdown","content":"Given are integers $L$ and $R$. Find the number, modulo $10^9 + 7$, of pairs of integers $(x, y)$ $(L \\leq x \\leq y \\leq R)$ such that the remainder when $y$ is divided by $x$ is equal to $y \\text{ XOR } x$.\nWhat is $\\text{ XOR }$?The XOR of integers $A$ and $B$, $A \\text{ XOR } B$, is defined as follows:\n\n*   When $A \\text{ XOR } B$ is written in base two, the digit in the $2^k$'s place ($k \\geq 0$) is $1$ if either $A$ or $B$, but not both, has $1$ in the $2^k$'s place, and $0$ otherwise.\n\nFor example, $3 \\text{ XOR } 5 = 6$. (In base two: $011 \\text{ XOR } 101 = 110$.)\n\n## Constraints\n\n*   $1 \\leq L \\leq R \\leq 10^{18}$\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$L$ $R$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc138_f","tags":[],"sample_group":[["2 3","3\n\nThree pairs satisfy the condition: $(2, 2)$, $(2, 3)$, and $(3, 3)$."],["10 100","604"],["1 1000000000000000000","68038601\n\nBe sure to compute the number modulo $10^9 + 7$."]],"created_at":"2026-03-03 11:01:13"}}