1328A - Divisibility Problem
28 Jan 2021 — Tags: None
Click to show code.
using namespace std;
int main(void)
{
int t, a, b, mod;
cin >> t;
while (t--)
{
cin >> a >> b;
mod = a % b;
cout << (b - mod) % b << endl;
}
}