fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. long long a, b;
  6. cin >> a >> b;
  7. cout << (b-a) - a%(b-a);
  8. return 0;
  9. }
Success #stdin #stdout 0s 5288KB
stdin
5 9
stdout
3