Given and . The task is to find a N digits number which is divisible by D ( 2 <= D <= 10). If it is not possible then print Impossible.
Input : N = 2 and D = 2 Output : 20 Input : N = 1 and D = 10 Output : Impossible
Approach: There are two conditions D=10 and D not equals 10. Id D = 10 and N = 1 then only answer is not possible and in all other conditions, the answer will be possible.
1. If D is 10, Print 1 followed by n-1 times zero. 2. If D is not 10 Print D followed by n-1 times zero
Below is the implementation of the above approach: