{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n \u003cspan lang\u003d\"en-us\"\u003e\u003cp\u003eThe number 666 is considered to be the occult “number of the beast” and is a well used number in all major apocalypse themed blockbuster movies. However the number 666 can’t always be used in the script so numbers such as 1666 are used instead. Let us call the numbers containing at least three contiguous sixes beastly numbers. The first few beastly numbers are 666, 1666, 2666, 3666, 4666, 5666…\u003c/p\u003e\u003cp\u003eGiven a 1-based index \u003ci\u003en\u003c/i\u003e, your program should return the \u003ci\u003en\u003c/i\u003eth beastly number.\u003c/p\u003e\u003c/span\u003e\n \u003c/div\u003e\n找到第n个,含有至少3个连续6的数字。\n"}},{"title":"Input","value":{"format":"HTML","content":"\n \u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n \u003cspan lang\u003d\"en-us\"\u003e\u003cp\u003eThe first line contains the number of test cases \u003ci\u003eT\u003c/i\u003e (\u003ci\u003eT\u003c/i\u003e ≤ 1,000).\u003c/p\u003e\u003cp\u003eEach of the following \u003ci\u003eT\u003c/i\u003e lines contains an integer \u003ci\u003en\u003c/i\u003e (1 ≤ \u003ci\u003en\u003c/i\u003e ≤ 50,000,000) as a test case.\u003c/p\u003e\u003c/span\u003e\n \u003c/div\u003e\n\u003cbr\u003e第一行一个整数T,表示测试数据组数\n\u003cbr\u003e接下来T行,每行一个整数n\n"}},{"title":"Output","value":{"format":"HTML","content":"\u003cdiv class\u003d\"ptx\" lang\u003d\"en-US\"\u003e\n \u003cp\u003eFor each test case, your program should output the \u003ci\u003en\u003c/i\u003eth beastly number.\u003c/p\u003e\n \u003c/div\u003e\n\u003cbr\u003e输出对应结果"}},{"title":"Sample Input","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e3\n2\n3\n187\u003c/pre\u003e"}},{"title":"Sample Output","value":{"format":"HTML","content":"\u003cpre class\u003d\"sio\"\u003e1666\n2666\n66666\u003c/pre\u003e"}}]}