Source Code
#include<iostream>
using namespace std;


int main() {
	int n;
	long long int x, y;
	cin >> n;
	for (int i = 1;i <= n;i++) {
		cin >> x >> y;
		long long int k = x;
		while (1) {
			if (k % y == 0)
			{
				cout << k << endl;
				break;
			}
			k++;
		}

	}
	return 0;
}
Copy
AZOZ with an O (EZ Version) hoodlum awm
GNU G++17
2027 ms
680 KB
Time Limit Exceeded