100 atcoder#ABC165D. [ABC165D] Floor Function
[ABC165D] Floor Function
Score : points
Problem Statement
Given are integers , , and .
Find the maximum possible value of for a non-negative integer not greater than .
Here denotes the greatest integer not greater than the real number .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the maximum possible value of for a non-negative integer not greater than , as an integer.
5 7 4
2
When , $floor(Ax/B)-A \times floor(x/B) = floor(15/7) - 5 \times floor(3/7) = 2$. This is the maximum value possible.
11 10 9
9