P27814 [洛谷] [Language Competition February 2023] Late Autumn Poetry
普及-
题目描述

Background

In these impoverished times, what can a poet do?
Yet, you say, the poet is a sacred priest of Dionysus,
Walking the earth in the sacred night.
—Hölderlin

Problem Description

The poet has two warehouses. Warehouse A contains $x$ liters of beer, and Warehouse B contains an unknown amount of beer. If Warehouse A gives $z$ liters of beer to Warehouse B, the volumes of beer in both warehouses will be equal.

A truck that can transport up to $c$ liters of beer is available to move all the beer from Warehouse B. How many trips are needed at a minimum?

Input Format

The input consists of two lines.

The first line contains two positive integers $x$ and $z$.

The second line contains a floating-point number $c$.

Output Format

Output a single integer representing the minimum number of trips required.

Sample Input and Output

Sample Input #1

5 1
1.5

Sample Output #1

2

Sample Input #2

1000000000000 2
99.435

Sample Output #2

10056821039

Notes

Data Size and Constraints

For $20\%$ of the test cases, it is guaranteed that $z = 0$;
For $30\%$ of the test cases, it is guaranteed that $c$ is an integer;
For $100\%$ of the test cases, the conditions $0 \leq z \leq 10^{12}$, $2z < x \leq 10^{18}$, and $1 \leq c \leq 10^{18}$ are satisfied.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
5 1 1.5
样例输出
2