{"trustable":false,"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\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 type\u003d\"text/javascript\" async src\u003d\"https://mathjax.codeforces.org/MathJax.js?config\u003dTeX-AMS_HTML-full\"\u003e\u003c/script\u003e","sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eTa định nghĩa hàm $$$S(x)$$$ bằng tổng các chữ số của $$$x$$$ khi viết bằng hệ thập phân. Ví dụ: $$$S(5) \u003d 5$$$, $$$S(10) \u003d 1$$$, $$$S(322) \u003d 7$$$. Một số nguyên $$$x$$$ được gọi là \u003cb\u003ethú vị \u003c/b\u003e khi và chỉ khi $$$S(x + 1) \u0026lt; S(x)$$$. \u003c/p\u003e\n\u003cp\u003eCho một số nguyên $$$n$$$. Hãy đếm xem có bao nhiêu số tự nhiên $$$x$$$ trong đoạn $$$[1,n]$$$ sao cho $x$ là một số \u003cb\u003ethú vị\u003c/b\u003e."}},{"title":"Input","value":{"format":"HTML","content":"\u003cp\u003eDòng đầu tiên chứa một số nguyên $$$t$$$ là số bộ test.\n\u003cp\u003e$$$t$$$ dòng tiếp theo, dòng thứ $$$i$$$ chứa số nguyên $$$n$$$ là bộ test thứ $$$i$$$\u003c/p\u003e"}},{"title":"Output","value":{"format":"HTML","content":"\u003cp\u003eVới mỗi bộ test, in ra trên một dòng là một số nguyên duy nhất là đáp án của bộ test tương ứng.\u003c/p\u003e"}},{"title":"Giới hạn","value":{"format":"HTML","content":"\u003cli\u003e $$$1\\le t \\le 1000$$$\n\u003cli\u003e $$$1\\le n \\le 10^9$$$"}},{"title":"Ví dụ","value":{"format":"HTML","content":"\u003cdiv class\u003d\"sample-test\"\u003e\n \u003cdiv class\u003d\"input\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Input\n \u003c/div\u003e\n \u003cpre\u003e5\n1\n9\n10\n34\n880055535\n\u003c/pre\u003e\n \u003c/div\u003e\n \u003cdiv class\u003d\"output\"\u003e\n \u003cdiv class\u003d\"title\"\u003e\n Output\n \u003c/div\u003e\n \u003cpre\u003e0\n1\n1\n3\n88005553\n\u003c/pre\u003e\n \u003c/div\u003e\n\u003c/div\u003e"}},{"title":"Note","value":{"format":"HTML","content":"\u003cp\u003eSố nguyên \u003cb\u003ethú vị\u003c/b\u003e nhỏ nhất là số $$$9$$$.\u003c/p\u003e"}}]}