You are given a number N, you have to represent this number as sum of minimum number of possible psuedobinary numbers. A number is said to be psuedobinary number if its decimal number consists of only two digits (0 and 1)
Input : 31 Output : 11 10 10 Explanation : 31 can be represented as sum of minimum 3 psuedobinary numbers as 11+10+10
The first line of input contains an integer T denoting the Test cases. Then T test cases follow. Second line contains number N
N as sum of minimum number of possible psuedobinary numbers
1 ≤ T ≤ 50
1 ≤ N ≤ 106
11 11 11 11
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.