P27363 [AtCoder] Vapor Pressure
普及+
题目描述

Problem Description

There are $ A $ balls and $ B $ balloons. Takahashi will keep removing one ball at a time until the number of balls is less than or equal to $ C $ times the number of balloons. Find the value obtained by dividing the final number of balls by the number of balloons.

Input Format

The input is given from the standard input in the following format:

$ A $ $ B $ $ C $

Output Format

Output the answer.
The answer will be considered correct if the absolute or relative error is within $ 10^{-6} $.

Sample Input and Output

Sample Input #1

8 3 2

Sample Output #1

2.000000000000000

Sample Input #2

8 5 2

Sample Output #2

1.600000000000000

Notes/Hints

Constraints

  • $1 \leq A, B, C \leq 10^4$
  • $ A, B, C $ are integers

Sample Explanation 1

Initially, there are $ 8 $ balls. Takahashi removes balls until the number of balls is $3 \times 2 = 6$ or less, leaving $ 6 $ balls. Therefore, the answer is $\frac{6}{3} = 2$.

Sample Explanation 2

Since $8 \leq 5 \times 2$ from the beginning, Takahashi does not remove any balls. Therefore, the answer is $\frac{8}{5} = 1.6$.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
8 3 2
样例输出
2.000000000000000