{"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给定一个整数 $$$n$$$。你需要改变它的最少位数,使得结果的数字 \u003cspan class\u003d\"tex-font-style-bf\"\u003e没有前导零\u003c/span\u003e 并且 \u003cspan class\u003d\"tex-font-style-bf\"\u003e能被 $$$7$$$ 整除\u003c/span\u003e。\u003c/p\u003e\u003cp\u003e如果有多种方法可以实现,随意输出其中一种。如果给定的数字已经能被 $$$7$$$ 整除,就不需要改变。\u003c/p\u003e"}},{"title":"输入","value":{"format":"HTML","content":"\u003cp\u003e第一行包含一个整数 $$$t$$$ ($$$1 \\le t \\le 990$$$) —— 测试用例的数量。\u003c/p\u003e\u003cp\u003e接下来是每个测试用例,每个测试用例包含一行,包含一个整数 $$$n$$$ ($$$10 \\le n \\le 999$$$)。\u003c/p\u003e"}},{"title":"输出","value":{"format":"HTML","content":"\u003cp\u003e对于每个测试用例,输出一个不带前导零的整数 —— 你所做改变的结果(即能被 $$$7$$$ 整除,并且可以通过改变 $$$n$$$ 中最少位数得到的整数)。\u003c/p\u003e\u003cp\u003e如果有多种方法可以应用改变,输出任意一个结果。如果给定的数字已经能被 $$$7$$$ 整除,直接输出它。\u003c/p\u003e"}},{"title":"示例 1","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\n42\n23\n377\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003e42\n28\n777\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在示例的第一个测试用例中,$$$42$$$ 已经能被 $$$7$$$ 整除,所以不需要改变。\u003c/p\u003e\u003cp\u003e在示例的第二个测试用例中,有多个答案 —— $$$28$$$、$$$21$$$ 或 $$$63$$$。\u003c/p\u003e\u003cp\u003e在示例的第三个测试用例中,其他可能的答案还有 $$$357$$$、$$$371$$$ 和 $$$378$$$。注意你\u003cspan class\u003d\"tex-font-style-bf\"\u003e不能\u003c/span\u003e输出 $$$077$$$ 或 $$$77$$$。\u003c/p\u003e"}}]}