#t216. 苹果和虫子

苹果和虫子

Apples and a Worm

Problem Description

You bought a box of  n \,n\, apples, but unfortunately a worm got mixed in when you bought them. The worm can eat one apple every  x \,x\, hours, and it will not start another apple before finishing the current one. After  y \,y\, hours, how many whole apples do you still have left? (The input data guarantees  y≤nx\,y\le nx.)

Input Format

The input is a single line containing  n\,n, x x\, and  y\,y (all non-negative integers).

Output Format

Output a single line containing the number of apples left.

Sample Input

10 4 9

Sample Output

7

Hint

  • Apples eaten: after yy hours, at one apple per xx hours — but a "half-eaten" apple also counts as gone, so think about when you need to round up.
  • The answer can never be negative; think about why (the data guarantee in the statement).
  • Try the official hint: complete it without any branch statements, relying only on the nature of integer division.

int-type integers truncate the fractional part of a floating-point number directly.

This problem can be solved without any branch statements.