{"trustable":true,"prependHtml":"\u003cscript\u003e\n window.katexOptions \u003d {\n delimiters: [\n {left: \u0027\\\\(\u0027, right: \u0027\\\\)\u0027, display: false},\n ]\n };\n\u003c/script\u003e\n","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e\nLittle Sub is about to take a math exam at school. As he is very confident, he believes there is no need for a review.\n\u003c/p\u003e\n\u003cp\u003e \nLittle Sub\u0027s father, Mr.Potato, is nervous about Little Sub\u0027s attitude, so he gives Little Sub a task to do. To his surprise, Little Sub finishes the task quickly and perfectly and even solves the most difficult problem in the task.\n\u003c/p\u003e\n\u003cp\u003e\nMr.Potato trys to find any possible mistake on the task paper and suddenly notices an interesting problem. It\u0027s a problem related to Pascal\u0027s Triangle.\n\n\u003c/p\u003e\u003cdiv style\u003d\"text-align: center;\"\u003e\n\t\u003cimg height\u003d\"384\" src\u003d\"CDN_BASE_URL/ed94e03bad2eb0b49c65854a0718b921?v\u003d1714848208\" alt\u003d\"“math”/\"\u003e\n\u003c/div\u003e\n\n\u003cp\u003e\nThe definition of Pascal\u0027s Triangle is given below:\n\u003c/p\u003e\n\u003cp\u003e\nThe first element and the last element of each row in Pascal\u0027s Triangle is $1$, \nand the $m$-th element of the $n$-th row equals to the sum of the $m$-th and the $(m-1)$-th element of the $(n-1)$-th row.\n\u003c/p\u003e\n\n\u003cp\u003eAccording to the definition, it\u0027s not hard to deduce the first few lines of the Pascal\u0027s Triangle, which is:\u003cbr\u003e\n$1$\u003cbr\u003e\n$1$ $1$\u003cbr\u003e\n$1$ $2$ $1$\u003cbr\u003e\n$1$ $3$ $3$ $1$\u003cbr\u003e\n$1$ $4$ $6$ $4$ $1$\u003cbr\u003e\n......\u003cbr\u003e\n\u003c/p\u003e\n\n\u003cp\u003e\nIn the task, Little Sub is required to calculate the number of odd elements in the 126th row of Pascal\u0027s Triangle.\n\u003c/p\u003e\n\u003cp\u003e\nMr.Potato now comes up with a harder version of this problem. He gives you many queries on this problem, but the row number may be extremely large. For each query, please help Little Sub calculate the number of odd elements in the $k$-th row of Pascal\u0027s Triangle.\n\u003c/p\u003e\n\n\n\u003ch4\u003eInput\u003c/h4\u003e\n\u003cp\u003e\nThere are multiple test cases. The first line of the input contains an integer $T$ ($1 \\le T \\le 500$), indicating the number of test cases. For each test case:\n\u003c/p\u003e\n\u003cp\u003e\nThe first and only line contains an integer $k$ ($1 \\le k \\le 10^{18}$), indicating the required row number in Pascal\u0027s Triangle.\n\u003c/p\u003e\n\n\u003ch4\u003eOutput\u003c/h4\u003e\n\u003cp\u003e\nFor each test case, output the number of odd numbers in the $k$-th line.\n\u003c/p\u003e\n\n\u003ch4\u003eSample\u003c/h4\u003e\n\u003ctable class\u003d\"vjudge_sample\"\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\n4\n5\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e2\n4\n2\n\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n\n"}}]}