B - Ringo's Favorite Numbers Editorial /

Time Limit: 2 sec / Memory Limit: 976 MB

配点: 200

問題文

今日は, 記念すべき AtCoder Beginner Contest 100 が開催される. そのため, 高橋君はりんごさんに, ある整数をプレゼントしようと思った.
今日のコンテストは「AtCoder Beginner Contest 100」なので, りんごさんは 100ちょうど D 回割りきれる正の整数をプレゼントされると喜ぶ.

さて, りんごさんがプレゼントされると喜ぶような整数のうち N 番目に小さいものを求めなさい.

制約

  • D0, 1, 2 のいずれかである
  • N1 以上 100 以下の整数

入力

入力は以下の形式で標準入力から与えられる.

D N

出力

100 でちょうど D 回割りきれる正の整数の中で N 番目に小さいものを出力しなさい.


入力例 1

0 5

出力例 1

5

100 でちょうど 0 回割り切れる(すなわち, 100 で割り切れない)整数は, 1, 2, 3, 4, 5, 6, 7, ... と続く.
よって, 5 番目に小さいりんごさんが喜ぶ整数は 5 である.


入力例 2

1 11

出力例 2

1100

100 でちょうど 1 回割り切れる整数は, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1 \ 000, 1 \ 100, ... と続く.
よって, 求めたい整数は 1 \ 100 である.


入力例 3

2 85

出力例 3

850000

100 でちょうど 2 回割り切れる整数は, 10 \ 000, 20 \ 000, 30 \ 000, ... と続く.
よって, 求めたい整数は 850 \ 000 である.

Score: 200 points

Problem Statement

Today, the memorable AtCoder Beginner Contest 100 takes place. On this occasion, Takahashi would like to give an integer to Ringo.
As the name of the contest is AtCoder Beginner Contest 100, Ringo would be happy if he is given a positive integer that can be divided by 100 exactly D times.

Find the N-th smallest integer that would make Ringo happy.

Constraints

  • D is 0, 1 or 2.
  • N is an integer between 1 and 100 (inclusive).

Input

Input is given from Standard Input in the following format:

D N

Output

Print the N-th smallest integer that can be divided by 100 exactly D times.


Sample Input 1

0 5

Sample Output 1

5

The integers that can be divided by 100 exactly 0 times (that is, not divisible by 100) are as follows: 1, 2, 3, 4, 5, 6, 7, ...
Thus, the 5-th smallest integer that would make Ringo happy is 5.


Sample Input 2

1 11

Sample Output 2

1100

The integers that can be divided by 100 exactly once are as follows: 100, 200, 300, 400, 500, 600, 700, 800, 900, 1 \ 000, 1 \ 100, ...
Thus, the integer we are seeking is 1 \ 100.


Sample Input 3

2 85

Sample Output 3

850000

The integers that can be divided by 100 exactly twice are as follows: 10 \ 000, 20 \ 000, 30 \ 000, ...
Thus, the integer we are seeking is 850 \ 000.