Source Code
#include <iostream>
using namespace std;

int main() {
	int T, x, y;
	cin >> T;
	while (T--) {
		cin >> x >> y;
		
		if (x <= y) {
			cout << y << endl;
		}
		else {
			int mult = x/y;
		
			if (x % y != 0)
				mult++;
			
			int answer = y * mult;
			cout << answer << endl;
		}
	}
}
Copy
AZOZ with an O (EZ Version) Dana
GNU G++17
249 ms
1.7 MB
Accepted