100 atcoder#ABC100B. [ABC100B] Ringo's Favorite Numbers
[ABC100B] Ringo's Favorite Numbers
Score: 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 exactly times.
Find the -th smallest integer that would make Ringo happy.
Constraints
- is , or .
- is an integer between and (inclusive).
Input
Input is given from Standard Input in the following format:
Output
Print the -th smallest integer that can be divided by exactly times.
0 5
5
The integers that can be divided by exactly times (that is, not divisible by ) are as follows: , , , , , , , ... Thus, the -th smallest integer that would make Ringo happy is .
1 11
1100
The integers that can be divided by exactly once are as follows: , , , , , , , , , , , ... Thus, the integer we are seeking is .
2 85
850000
The integers that can be divided by exactly twice are as follows: , , , ... Thus, the integer we are seeking is .