{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003e \u003cspan\u003e\u003ca href\u003d\"http://7xjob4.com1.z0.glb.clouddn.com/896ed59b7a237fb98e750c3414895dce\"\u003e \u003cimg alt\u003d\"Download as PDF\" height\u003d\"26\" src\u003d\"http://uva.onlinejudge.org/components/com_onlinejudge/images/button_pdf.png\" title\u003d\"Download as PDF\" width\u003d\"100\"\u003e \u003c/a\u003e\u003c/span\u003e\u003c/p\u003e \n\u003cdiv\u003e\n \u0026nbsp;\n\u003c/div\u003e \n\u003cp\u003e Trung is bored with his mathematics homeworks. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to \u003cspan\u003e\u003ci\u003eN\u003c/i\u003e\u003c/span\u003e \u003cspan\u003e(1 \u0026lt; \u003ci\u003eN\u003c/i\u003e \u0026lt; 10000)\u003c/span\u003e . After that, he counts the number of times each digit (0 to 9) appears in the sequence. For example, with \u003cspan\u003e\u003ci\u003eN\u003c/i\u003e \u003d 13\u003c/span\u003e , the sequence is: \u003c/p\u003e \n\u003cp\u003e 12345678910111213\u003c/p\u003e \n\u003cp\u003e In this sequence, 0 appears once, 1 appears 6 times, 2 appears 2 times, 3 appears 3 times, and each digit from 4 to 9 appears once. After playing for a while, Trung gets bored again. He now wants to write a program to do this for him. Your task is to help him with writing this program.\u003c/p\u003e \n\u003cp\u003e \u0026nbsp;\u003c/p\u003e \n\u003ch2\u003e \u003ca\u003e Input\u003c/a\u003e\u0026nbsp;\u003c/h2\u003e \n\u003cp\u003e The input file consists of several data sets. The first line of the input file contains the number of data sets which is a positive integer and is not bigger than 20. The following lines describe the data sets.\u003c/p\u003e \n\u003cp\u003e For each test case, there is one single line containing the number \u003cspan\u003e\u003ci\u003eN\u003c/i\u003e\u003c/span\u003e . \u003c/p\u003e \n\u003cp\u003e \u0026nbsp;\u003c/p\u003e \n\u003ch2\u003e \u003ca\u003e Output\u003c/a\u003e\u0026nbsp;\u003c/h2\u003e \n\u003cp\u003e For each test case, write sequentially in one line the number of digit \u003cspan\u003e0, 1,...9\u003c/span\u003e separated by a space. \u003c/p\u003e \n\u003cp\u003e \u0026nbsp;\u003c/p\u003e \n\u003ch2\u003e \u003ca\u003e Sample Input\u003c/a\u003e\u0026nbsp;\u003c/h2\u003e \n\u003cp\u003e \u0026nbsp;\u003c/p\u003e \n\u003cpre\u003e\r\n2 \r\n3 \r\n13\r\n\u003c/pre\u003e \n\u003cp\u003e \u0026nbsp;\u003c/p\u003e \n\u003ch2\u003e \u003ca\u003e Sample Output\u003c/a\u003e\u0026nbsp;\u003c/h2\u003e \n\u003cp\u003e \u0026nbsp;\u003c/p\u003e \n\u003cpre\u003e\r\n0 1 1 1 0 0 0 0 0 0 \r\n1 6 2 2 1 1 1 1 1 1\r\n\u003c/pre\u003e"}}]}