Codeforces 1328 A. Divisibility Problem Solution
- Solution in C++:
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int t,n,i,a,b,c;
- cin>>t;
- while(t--)
- {
- cin>>a>>b;
- if(a%b!=0)
- {
- c=b-(a%b);
- cout<<c<<endl;
- }
- else
- cout<<"0"<<endl;
- }
- }
Problem Link https://codeforces.com/contest/2009/problem/C S olution in C++: /// Author : AH_Tonmoy #include < bits / stdc ++. h ...
No comments