Source Code
#include <iostream>
#include <math.h>
using namespace std;
#define ll long long int

int main() {
	ll t;
	double first, second;
	cin >> t;
	while (t--) {
		cin >> first >> second;
		double k = first;
		if (first <= second)
			cout << second << endl;
		else if (k > second) {
			if (second == 1)
				cout << k;
			else {
				double part = ceil(k / second);
				cout << second * part << endl;
			}
		}
	}
}
Copy
AZOZ with an O (EZ Version) Rokii
GNU G++17
315 ms
1.1 MB
Wrong Answer