Source Code
#include <iostream>
#include <string>
using namespace std;
int main() {
	int T, x, y;

	scanf("%d", &T);

	for(int i=0;i<T;i++){
	    scanf("%d%d", &x, & y);
		int j = x;
		while (1){
			if (j % y == 0) {
				printf("%d\n",j);
				break;
			}
			else{
				j++;
			}
		}
	}


	return 0;
}
Copy
AZOZ with an O (EZ Version) safareto
GNU G++17
2054 ms
1.1 MB
Time Limit Exceeded