Source Code
#include <iostream>
using namespace std;

void solve(){
	int x,y;
	cin>>x>>y;
	
	for(int i=x+1;;i++){
		if(i%y==0){
			cout<<i<<endl;
			return ;
		}
	}
}
int main() {
	// your code goes here
	
	int t;
	cin>>t;
	while(t--){
		solve();
	}
	return 0;
}
Copy
AZOZ with an O (EZ Version) Razanaws
GNU G++17
2083 ms
1.0 MB
Time Limit Exceeded