Skip to content

Commit 821c779

Browse files
authored
1328A
1 parent 1b7fd06 commit 821c779

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

Divisiblity_problem.cpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#include <iostream>
2+
using namespace std;
3+
int main() {
4+
int test;
5+
cin>>test;
6+
while(test--){
7+
8+
int a,b;
9+
cin>>a>>b;
10+
if(a%b==0)
11+
{
12+
cout<<0<<endl;
13+
}
14+
else {
15+
int k=a%b;
16+
cout<<b-k<<endl;
17+
}
18+
}
19+
return 0;
20+
}

0 commit comments

Comments
 (0)