{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cscript type\u003d\u0027text/x-mathjax-config\u0027\u003eMathJax.Hub.Config({tex2jax: { inlineMath: [[\u0027$\u0027,\u0027$\u0027],[\u0027\\[\u0027,\u0027\\]\u0027]] } }); \u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027 src\u003d\u0027https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\u0027\u003e\u003c/script\u003e\n\u003cscript type\u003d\u0027text/javascript\u0027\u003esetTimeout(function(){MathJax.Hub.Queue([\u0027Typeset\u0027, MathJax.Hub, \u0027description-container\u0027]);}, 2000);\u003c/script\u003e\n\u003cspan id\u003d\"Showjim2_bnbbbsbl_s3\" style\u003d\"display:none\"\u003e\u003c/span\u003e1,10,100,1000...constitute the sequence 1101001000..., and you duty is to find out the nth number of the sequence is 0 or 1\n\u003cdiv id\u003d\"Showjim30_bjbgbsbbbnbf\"\u003e\n \u003cspan id\u003d\"Showjim2_bnbbbsbl_s3\" style\u003d\"display:none\"\u003e\u003c/span\u003e\n \u003cspan id\u003d\"Showjim2_bnbbbsbl_e3\" style\u003d\"display:none\"\u003e\u003c/span\u003e\n\u003c/div\u003e\n\u003cspan id\u003d\"Showjim2_bnbbbsbl_e3\" style\u003d\"display:none\"\u003e\u003c/span\u003e"}},{"title":"Input","value":{"format":"HTML","content":"First line: A number T , the number of test cases(1 \u0026lt;\u003d T \u0026lt;\u003d 10000)\n\u003cbr\u003e2 - T + 1 line:A number N(1 \u0026lt;\u003d N \u0026lt;\u003d 10^9)"}},{"title":"Output","value":{"format":"HTML","content":"T lines \u003cbr\u003eoutput the Nth number of the sequence"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e3\n1\n2\n3\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e1\n1\n0\u003c/pre\u003e"}}]}