#abc100b. B - Ringo's Favorite Numbers
B - Ringo's Favorite Numbers
Score: points
问题描述
今天,令人难忘的AtCoder新手大赛100正在进行。在这个场合,Takahashi想要给Ringo一个整数。
由于比赛的名字是AtCoder新手大赛100,如果他能得到一个可以恰好被整除次的正整数,Ringo将会非常开心。
请你找出第个能让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 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.
Sample Input 1
0 5
Sample Output 1
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 .
Sample Input 2
1 11
Sample Output 2
1100
The integers that can be divided by exactly once are as follows: , , , , , , , , , , , ...
Thus, the integer we are seeking is .
Sample Input 3
2 85
Sample Output 3
850000
The integers that can be divided by exactly twice are as follows: , , , ...
Thus, the integer we are seeking is .
update @ 2024/3/10 17:18:24