xuanthang180409
Rating
-
Problems
28
Points
3552
Rating #
-
Points #
10641
About
include <bits/stdc++.h>
using namespace std;
int main()
{ int q;
int n,k;
cin>>q;
int dem=0;
while(q>=0) {
cin>>n>>k;
for(int i=1;i<=1e9;i++)
{
if(i%n!=0) dem++;
if(dem==k){ cout<<i<<endl;
break;}
}
dem=0;
q--;
}
return 0;
}