Source Code
#include<string>
#include <iostream>
using namespace std;


int main() {

	int t;
	cin >> t;
	int x=0, y=0, num = 0;
	
	while (t--) 
	{
		cin >> x >> y;
		if (x < y) {
			cout << y<<endl;
			continue;
		}

		
		if (x % y == 0)
			cout << x<<endl;
		
		else
		{
			cout << (((x / y) + 1) * y) << endl;
		}


	}



}
Copy
AZOZ with an O (EZ Version) hatamleh
GNU G++17
244 ms
1.6 MB
Accepted