Next Magical Number

 avatar
ishan
c_cpp
15 days ago
320 B
3
Indexable
#include <bits/stdc++.h>
using namespace std;

#define int long long
#define endl '\n'

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(NULL);


    int t;
    cin >> t;
    while (t --)
    {
        int n , m ;
        cin >> n >> m ;

        cout << n * ((m/n)+1)<< endl ;
    }
}
Editor is loading...
Leave a Comment