Dragon’s Question | 프로그래밍의 벗 PivotOJ
PivotOJ

Dragon’s Question

시간 제한: 3000ms메모리 제한: 256MB출처: NEERC Northern Subregional 2009BOJ 3553

문제

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.

"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.

"Give me a positive integer number which is divisible by dd and has exactly nn digits in it, assuming that dd is equal to forty-five and nn is equal to three!" --- was the dragon's question.

"One hundred and thirty-five." --- answered the elder brother.

"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. 

"Hey boys, give me a positive integer number which is divisible by twenty three and has exactly one digit in it" --- asked the dragon.

"No solution" --- answered the middle brother.

"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.

입력

The input file contains the only line with numbers nn and dd (1n10001 \le n \le 1000; 1d10000001 \le d \le 1\,000\,000).

출력

The first and only line of the output file must contain the answer to be given to the dragon --- either a nn-digit number (without leading zeroes) divisible by dd or a string No solution.

예제

예제 1

입력
20 1
출력
10000000000000000000

예제 2

입력
1 23
출력
No solution

예제 3

입력
1 4
출력
4
코드를 제출하려면 로그인하세요.