Source Code
#include <iostream>
using namespace std;

int main() {

    int n;
    cin>>n;
    for(int i=0; i<n; i++){
        int x,y;
        cin>>x>>y;
        if(x<=y) cout<<y<<endl;
        else{
            if(x%y!=0)
                cout<<x+(y-(x%y))<<endl;
            else cout <<x<<endl;
        }
    }
	return 0;
}
Copy
AZOZ with an O (EZ Version) samihamad
GNU G++17
252 ms
1.8 MB
Accepted