Source Code
#include <iostream>
using namespace std;

int main()
{
    int t;
    
    cin >> t;
    for (int i = 0;i < t;i++) {
        int x, y;
        cin >> x >> y;
        int k = x;
        for (int i = 0;i < 1e9;i++) {
            if (k % y == 0) {
                printf("%d",k);
                
                break;
            }
            k++;
        }
    }
}
Copy
AZOZ with an O (EZ Version) hadeelYasir
GNU G++17
3 ms
336 KB
Wrong Answer