100 atcoder#ABC146C. [ABC146C] Buy an Integer
[ABC146C] Buy an Integer
Score : points
Problem Statement
Takahashi has come to an integer shop to buy an integer.
The shop sells the integers from through . The integer is sold for yen (the currency of Japan), where is the number of digits in the decimal notation of .
Find the largest integer that Takahashi can buy when he has yen. If no integer can be bought, print .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the greatest integer that Takahashi can buy. If no integer can be bought, print .
10 7 100
9
The integer is sold for yen, and this is the greatest integer that can be bought. Some of the other integers are sold for the following prices:
- yen
- yen
- yen
2 1 100000000000
1000000000
He can buy the largest integer that is sold. Note that input may not fit into a -bit integer type.
1000000000 1000000000 100
0
1234 56789 314159265
254309