~/algor $ cat problems/while-kesmani-joylashtirish
Placing segments
Easy
1000 ms
64 MB
23%
Two positive integers $A$ and $B$ are given ($A \gt B$). The greatest possible number of segments of length $B$ is placed on a segment of length $A$. Find the length of the unoccupied part of segment $A$.
Input
One line with two integers: $A$ and $B$.
Output
One integer — the length of the unoccupied part.
Note
$1 \le B \lt A \le 10^{6}$
Examples
Input #1
10 3
Output #1
1
Input #2
15 5
Output #2
0