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

int main() {
	ll t, first, second;
	cin >> t;
	while (t--) {
		cin >> first >> second;
		ll k = first;
		if (k > second) {
			while (k % second != 0) {
				k++;
			}
			cout << k << endl;
		}
		else
			cout << second << endl;
	}
	
}




Copy
AZOZ with an O (EZ Version) Rokii
GNU G++17
2073 ms
1.1 MB
Time Limit Exceeded