Source Code
#include <iostream>
#include <math.h>
using namespace std;

int main() {
	int T;
	int x, y;
	cin >> T;
	while (T--) {
		cin >> x >> y;
		if (y >= x)
			cout << y << endl;
		else {
			for (int i=x; i<x+y; i++) {
				if (i % y == 0) {
					cout << i << endl;
					break;
				}
			}
		}
	}
}
Copy
AZOZ with an O (EZ Version) Dana
GNU G++17
2024 ms
1.2 MB
Time Limit Exceeded