Source Code
*******************************************************************************/
#include <iostream>
#include <bits/stdc++.h> 
using namespace std;
int t,x,y,k;
int main()
{
    cin>>t;
    for(int i=0;i<t;i++){
        cin>>x>>y;
        k=0;
        int j = x;
        while(k<j || k%y != 0){
            k++;
        }
        cout<<k<<endl;
    }
    

    return 0;
}
Copy
AZOZ with an O (EZ Version) sharawi
GNU G++17
0 ms
0 KB
Compilation Error