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;
		int l = k % y;
		k = k - l;
		k = k + y;
		while (1) {
			
			if (k % y == 0)
			{
				cout << k << endl;
				break;
			}
			k=k+y;
		}

	}
	return 0;
}
	return 0;
}
Copy
AZOZ with an O (EZ Version) hoodlum awm
GNU G++17
0 ms
0 KB
Compilation Error