Next Magical Number
ishan
c_cpp
7 months ago
320 B
5
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