{"trustable":false,"prependHtml":"\u003cscript\u003e window.katexOptions \u003d { disable: true }; \u003c/script\u003e\n\u003cscript type\u003d\"text/x-mathjax-config\"\u003e\n MathJax.Hub.Config({\n tex2jax: {\n inlineMath: [[\u0027$$$\u0027,\u0027$$$\u0027], [\u0027$\u0027,\u0027$\u0027]],\n displayMath: [[\u0027$$$$$$\u0027,\u0027$$$$$$\u0027], [\u0027$$\u0027,\u0027$$\u0027]]\n }\n });\n\u003c/script\u003e\n\u003cscript async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS-MML_HTMLorMML\" type\u003d\"text/javascript\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"给一个数字N,求1~N有多少个数字的序列包含“49”子序列。"}},{"title":"Input","value":{"format":"HTML","content":"第一行输入由整数T(1 \u003c\u003d T \u003c\u003d 10000)组成,表示测试用例的数量。对于每个测试用例,将有一个整数N(1 \u003c\u003d N \u003c\u003d 2 ^ 63-1)作为描述。"}},{"title":"Output","value":{"format":"HTML","content":"对于每个测试用例,输出一个数字代表1到N有多少个包含49的数字。"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre\u003e3\n1\n50\n500\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre\u003e0\n1\n15\n\n\n \n \u003ci style\u003d\"font-size:1px\"\u003e \u003c/i\u003e\u003c/pre\u003e"}},{"title":"Hint","value":{"format":"HTML","content":"从1到500,包括“49”子序列的数字是“49”,“149”,“249”,“349”,“449”,“490”,“491”,“492”,“ 493“,”494“,”495“,”496“,”497“,”498“,”499“,\u003c/br\u003e\n所以答案是15。"}}]}