{"trustable":true,"prependHtml":"\u003cstyle type\u003d\u0027text/css\u0027\u003e\n .input, .output {\n border: 1px solid #888888;\n }\n .output {\n margin-bottom: 1em;\n position: relative;\n top: -1px;\n }\n .output pre, .input pre {\n background-color: #EFEFEF;\n line-height: 1.25em;\n margin: 0;\n padding: 0.25em;\n }\n \u003c/style\u003e\n \u003clink rel\u003d\"stylesheet\" href\u003d\"//codeforces.org/s/96598/css/problem-statement.css\" type\u003d\"text/css\" /\u003e\n\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027$$$$$$\u0027, right: \u0027$$$$$$\u0027, display: true},\n {left: \u0027$$$\u0027, right: \u0027$$$\u0027, display: false},\n {left: \u0027$$\u0027, right: \u0027$$\u0027, display: true},\n {left: \u0027$\u0027, right: \u0027$\u0027, display: false}\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e给定两个非负整数 $$$X$$$ 和 $$$Y$$$,确定 $$$$$$ \\sum_{i\u003d0}^{X}\\sum_{j\u003d[i\u003d0]}^{Y}[i\\\u0026amp;j\u003d0]\\lfloor\\log_2(i+j)+1\\rfloor $$$$$$ 对 $$$10^9+7$$$ 的值,其中 \u003c/p\u003e\u003cul\u003e \u003cli\u003e $$$\\\u0026amp;$$$ 表示按位与; \u003c/li\u003e\u003cli\u003e $$$[A]$$$ 如果 $$$A$$$ 为真则等于 1,否则 $$$0$$$; \u003c/li\u003e\u003cli\u003e $$$\\lfloor x\\rfloor$$$ 等于不超过 $$$x$$$ 的最大整数。 \u003c/li\u003e\u003c/ul\u003e"}},{"title":"输入","value":{"format":"HTML","content":"\u003cp\u003e第一行包含一个整数 $$$T\\,(1\\le T \\le 10^5)$$$,表示测试用例的数量。\u003c/p\u003e\u003cp\u003e接下来的 $$$T$$$ 行每行包含两个整数 $$$X, Y\\,(0\\le X,Y \\le 10^9)$$$,表示一个测试用例。\u003c/p\u003e"}},{"title":"输出","value":{"format":"HTML","content":"\u003cp\u003e对于每个测试用例,打印一行包含一个整数,即该测试用例的答案。\u003c/p\u003e"}},{"title":"示例","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e3\n3 3\n19 26\n8 17\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e14\n814\n278\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e"}},{"title":"注意","value":{"format":"HTML","content":"\u003cp\u003e对于第一个测试用例: \u003c/p\u003e\u003cul\u003e \u003cli\u003e 两个 $$$(i,j)$$$ 对增加总和 1: $$$(0, 1), (1, 0)$$$ \u003c/li\u003e\u003cli\u003e 六个 $$$(i,j)$$$ 对增加总和 2: $$$(0, 2), (0, 3), (1, 2), (2, 0), (2, 1), (3, 0)$$$ \u003c/li\u003e\u003c/ul\u003e\u003cp\u003e所以答案是 $$$1\\times 2 + 2\\times 6 \u003d 14$$$。\u003c/p\u003e"}}]}