dizel
In city A there is a supply of V liters of fuel (0 < V < 2000000000). A delivery truck needs to deliver as much fuel as possible from city A to city B. The distance betwen these cities is exactly D (0 < D <= 2000) kilometers. The truck consumes 1 liter of fuel for every 1 kilometer it drives, and it can accommodate [] liters for transportation and its own consumption (0 < C < 5000).
Your task is as follows: if you're given V, D and C, then calculate the largest amount of fuel that the truck is able to transport from city A to city B and the amount of fuel that in that case remains in city A.
InputThe first and only line of standard input contains the numbers V, D and C respectively.
OutputTo the standard output you should write one line with two numbers: the first number should be the greatest possible amount of fuel that can be transported from city A to city B and the second one should be the ammount of fuel left in city A in that case.
Input:
[c]2000 100 1000
Output:
[c]2000 100 1000
Output:
1700 0Submit solution
Coming laterThe grading service will be connected in a later migration step. You can inspect the task and your previous results now.