eolymp
bolt
Try our new interface for solving problems
Problems

Dragon`s Question

Dragon`s Question

In a land far-away there lives a noble man, and he has three sons. The elder of them is very clever, his especial strength is calculation: he can easily count a determinant of fifth degree in his mind without paper and pencil. The middle brother is also very talented, he is particularly strong in theoretic questions. But the younger brother has absolutely no talent in mathematics. One day they went for a walk. Suddenly a wind started to blow and something closed the sun from them: it was a hungry dragon, returning to his lair from unsuccessful hunt. "\textit{Hey, boys. I will give you a problem, and if you do not solve it, nothing will save you!}" - said the dragon. The elder brothers smiled ironically. Of course, they were so clever that no dragon could ask them a question they were not able to answer. "\textit{Give me a positive integer number which is divisible by }\textbf{d}\textit{ and has exactly }\textbf{n}\textit{ digits in it, assuming that }\textbf{d}\textit{ is equal to forty-five and }\textbf{n}\textit{ is equal to three!}" - was the dragon's question. "\textit{One hundred and thirty-five.}" - answered the elder brother. "\textit{Good, go where you want. But I will return and ask you a similar question in a year.}" - said the upset hungry dragon and flew away. A year passed, and the elder brother got married and left his parents' home. Two younger brothers went for a walk discussing this event, and met the dragon again. "\textit{Hey boys, give me a positive integer number which is divisible by twenty three and has exactly one digit in it}" - asked the dragon. "\textit{No solution}" - answered the middle brother. "\textit{You are still too clever, go where you want. But I will return and ask you a similar question.}" - said the dragon and flew away. Another year passed and the middle brother got married and left his parents' home. The younger brother now does not go outside, because he does not have enough knowledge to answer the dragon's questions. Please, help him and write a program - the boy is very afraid. \InputFile The input file contains the only line with numbers \textbf{n} and \textbf{d} (\textbf{1} ≤ \textbf{n} ≤ \textbf{1000}; \textbf{1} ≤ \textbf{d} ≤ \textbf{1 000 000}). \OutputFile The first and only line of the output file must contain the answer to be given to the dragon - either a \textbf{n}-digit number (without leading zeroes) divisible by \textbf{d} or a string "\textbf{No solution}".
Time limit 3 seconds
Memory limit 256 MiB
Input example #1
20 1
Output example #1
10000000000000000000