Next Magical Number

ishan avatar
ishan
C++
04/12/2025 1:14 PM
320 B
22
Indexable
Never
#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