#P5709. 【深基2.习6】Apples Prologue / 苹果和虫子
【深基2.习6】Apples Prologue / 苹果和虫子
Apples Prologue
Problem Source
Luogu P5709
Problem Description
Little B loves eating apples. She now has () apples; eating one apple takes () minutes, and she starts the next one immediately after finishing the previous one. Given that () minutes have passed, how many whole apples does she still have?
Input Format
The input consists of three non-negative integers .
Output Format
Print one integer: the answer.
Sample Input
50 10 200
Sample Output
30
Hint
- The model is the same as the previous problem: first compute how many were eaten, then subtract that from the total. But does a "half-eaten" apple count as eaten? Think about when you need to round up.
- Warning: may be — dividing by zero causes an immediate RE.
If you got an RE, why not check for division by zero?