{"trustable":false,"sections":[{"title":"","value":{"format":"HTML","content":"\u003cp\u003eFahim likes to solve mathematical problems. But sometimes it becomes challenging for him to solve all the mathematical problems. So sometimes he gets angry to solve mathematical puzzles. He takes a piece of chalk and starts writing a sequence of consecutive integers starting with 1 to N (1 \u003c N \u003c 10000). After that, he counts the number of times each digit (0 to 9) appears in the sequence. For example, with N \u003d 13, the sequence is.\u003c/p\u003e\n\n\u003ccenter\u003e12345678910111213\u003c/center\u003e\n\n\u003cp\u003eThe sequence is interesting, right! In this sequence, zero(0) appears once, one(1) appears 6 times, two(2) appears 2 times, three(3) appears 3 times, and each digit from four(4) to nine(9) appears once. After playing for a while, Fahim 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\n\u003ch4\u003eInput\u003c/h4\u003e\n\n\u003cp\u003eLook at the input file carefully. It 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. For each test case, there is one single line containing the number N.\u003c/p\u003e\n\n\u003ch4\u003eOutput\u003c/h4\u003e\n\u003cp\u003eNow for each individual test case, write sequentially in one line the number of digit 0, 1, . . . 9 separated by a space.\u003c/p\u003e\n\n\u003ch4\u003eSample Input\u003c/h4\u003e\n2\u003cbr\u003e\n3\u003cbr\u003e\n13\u003cbr\u003e\n\n\u003ch4\u003eSample Output\u003c/h4\u003e\n0 1 1 1 0 0 0 0 0 0\u003cbr\u003e\n1 6 2 2 1 1 1 1 1 1\u003cbr\u003e\n\n"}},{"title":"","value":{"format":"HTML","content":"\u003ch4\u003eNote\u003c/h4\u003e\nYou can submit your solution using C/C++/Java. If you want to submit your solution using JavaScript then ask volunteers."}}]}