Source Code
#include <bits/stdc++.h>
 
using namespace std;
 
int main()
{
    long long n;
    cin>>n;
    for(long long i=0;i<n;i++){
        long long  x,y;
        cin>>x>>y;
 
        long long z=(x%y==0?0:1)+x/y;
        cout<<z*y<<endl;
    }
    return 0;
}
Copy
AZOZ with an O (EZ Version) fakher20
GNU G++17
296 ms
1.7 MB
Accepted