P26761 [AtCoder] Competition
入门
题目描述

Problem Statement

A Supermarket Takahashi sells an X-gram beef pack for Y yen.
Another Supermarket Snuke has decided to sell a beef pack at a lower price per gram.
In Snuke, one beef pack weighs Z grams. What is the greatest possible price (a non-negative integer) for Snuke's beef pack such that it is strictly cheaper than Takahashi's beef pack per gram?

Input

Input is given from Standard Input in the following format:
X Y Z

Output

Print the answer.

Constraints

  • All values in input are integers.
  • 1 ≤ X, Y, Z ≤ 10^3

Sample Input 1

100 200 100

Sample Output 1

199

Both stores sell 100-gram packs, so Snuke can just make it one yen cheaper than that in Takahashi.

Sample Input 2

103 971 593

Sample Output 2

5590

Takahashi sells beef for $\frac{971}{103} = 9.4271\dots$ yen per gram. Snuke can sell 593 grams of beef for 5590 yen to make it $\frac{5590}{593} = 9.4266\dots$ yen per gram.

Sample Input 3

1000 1 1

Sample Output 3

0

The price is allowed to be 0 yen.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
100 200 100
样例输出
199