Masala #TSI4ZANQJU

Xotira 32 MB Vaqt 1000 ms Qiyinchiligi 1 %
14

  

New Year

New Year is approaching, but Santa isn't ready. He has only made \(k\) gifts, but there are \(n\) kids in the white list. He has asked Shohjahon to make \(m\) more gifts, so that the total number gifts can be equally divided among \(n\) kids. However, Shohjahon is not good at maths, so he asks you for help. As there is not much time left, print the minimum possible value of \(m\).


Kiruvchi ma'lumotlar:

Input consists of 2 lines. 

First line contains number \(n\) (1 ≤ \(n\) ≤ \(10^9\)).

Second line contains number \(k\) (1 ≤ \(k\) ≤ \(10^9\)).
 


Chiquvchi ma'lumotlar:

Print the answer to the problem - minimum possible value of \(m\)

It is guaranteed that answer always exists.
 


Misollar
# input.txt output.txt
1
3
5
1
2
1
67
0
Izoh:

In the first case we can see that there were 5 gifts initially, we can add 1 more gift and total number of gifts becomes 5 +1 = 6. We can equally divide 6 gifts among 3 children (6 / 3 = 2).

Yechimini yuborish
Bu amalni bajarish uchun tizimga kiring, agar profilingiz bo'lmasa istalgan payt ro'yxatdan o'tishingiz mumkin