Source Code
#include <bits/stdc++.h>
using namespace std;

void solve()
{
int x,y;
cin>>x>>y;

for(int i=x ; ; i++)
{

    if(i%y==0)
        {
            cout<<i;
            break;
        }
}
}

int main() {
	int t=1;
	cin>>t;
	while(t--)
	{
		solve();
		cout<<endl;
	}
	return 0;
}

Copy
AZOZ with an O (EZ Version) TATAKAE
GNU G++17
2073 ms
1.3 MB
Time Limit Exceeded