#abc100b. B - Ringo's Favorite Numbers

B - Ringo's Favorite Numbers

Score: 200200 points

问题描述

今天,令人难忘的AtCoder新手大赛100正在进行。在这个场合,Takahashi想要给Ringo一个整数。

由于比赛的名字是AtCoder新手大赛100,如果他能得到一个可以恰好100100整除DD次的正整数,Ringo将会非常开心。

请你找出第NN个能让Ringo开心的最小整数。

以上为通义千问 qwen-max 翻译,仅供参考。

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 100100 exactly DD times.

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

Constraints

  • DD is 00, 11 or 22.
  • NN is an integer between 11 and 100100 (inclusive).

Input

Input is given from Standard Input in the following format:

DD NN

Output

Print the NN-th smallest integer that can be divided by 100100 exactly DD times.

Sample Input 1

0 5

Sample Output 1

5

The integers that can be divided by 100100 exactly 00 times (that is, not divisible by 100100) are as follows: 11, 22, 33, 44, 55, 66, 77, ...
Thus, the 55-th smallest integer that would make Ringo happy is 55.

Sample Input 2

1 11

Sample Output 2

1100

The integers that can be divided by 100100 exactly once are as follows: 100100, 200200, 300300, 400400, 500500, 600600, 700700, 800800, 900900, 1 0001 \ 000, 1 1001 \ 100, ...
Thus, the integer we are seeking is 1 1001 \ 100.

Sample Input 3

2 85

Sample Output 3

850000

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

update @ 2024/3/10 17:18:24