Source Code
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define el endl
#define all(v) v.begin(),v.end()
#define t int t;cin>>t; while(t--)
#define out(a,n) for(int i=0;i<n;i++){cout<<a[i]<< " ";}
#define FAST ios_base::sync_with_stdio(false), cin.tie(NULL);
using namespace std;
using pll = pair<ll, ll>;
int main ()
{
    FAST;
    t
    {
        ll n,m;
        cin>>n>>m;
        if (m>n)
            cout<<m;        
        else        
            cout<<((n/m)+1)*m;
            cout<<endl;
        



    }

}







Copy
AZOZ with an O (EZ Version) Ann_Sam65
GNU G++17
209 ms
1.2 MB
Wrong Answer