Source Code
#include "bits/stdc++.h"
using namespace std;
typedef long long ll;

void solve(){
    ll x,y;
    cin>>x>>y;

    ll rem=x%y;
    rem=y-rem;
    if(rem==y) rem=0;

    cout<<x+rem;
}

int main(){
    ios::sync_with_stdio(0);
    cin.tie(0);
    
    int t=1;
    cin>>t;

    while(t--){
        solve();
        cout<<'\n';
    }
}
Copy
AZOZ with an O (EZ Version) YazanIstatiyeh
GNU G++17
24 ms
1.5 MB
Accepted