Source Code
#include <iostream>
#include <vector>

using namespace std;

int main() {
	int t; cin >> t;
	while (t--) {
		int n, k; cin >> n >> k;
		if (n % k == 0) {
			cout << n << endl;
			continue;
		}
		cout << k*((n / k) + 1) << endl;;
		
	}
	return 0;
}
Copy
AZOZ with an O (EZ Version) psutMoha
GNU G++17
250 ms
1.5 MB
Accepted