Logo
(追記) (追記ここまで)

3553번 - Dragon’s Question 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 256 MB25416613968.812%

문제

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 $d$ and has exactly $n$ digits in it, assuming that $d$ is equal to forty-five and $n$ 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 $n$ and $d$ (1ドル \le n \le 1000$; 1ドル \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 $n$-digit number (without leading zeroes) divisible by $d$ or a string No solution.

제한

예제 입력 1

20 1

예제 출력 1

10000000000000000000

예제 입력 2

1 23

예제 출력 2

No solution

예제 입력 3

1 4

예제 출력 3

4

힌트

출처

ICPC > Regionals > Northern Eurasia > Northwestern Russia Regional Contest > NEERC Northern Subregional 2009 D번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /