Source Code
#include <iostream>
using namespace std;
//int N = 10e5+1;

int main(){
    int t;
    cin >> t;
    long long x, y;
    while(t){
        cin >> x >> y;
        if(x <= y) {
            cout << y << endl;
        }
        else {
            cout<<x+(y-(x%y))<<endl;
        }
    t--;
    }
}
Copy
AZOZ with an O (EZ Version) Zeina.A
GNU G++17
235 ms
1.0 MB
Wrong Answer