Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- int testcase;
- cin>>testcase;
- while(testcase--)
- {
- int divisor, limit, temp=0;
- cin>>divisor>>limit;
- for(int i=1; i<=limit; i++)
- {
- if(i%divisor!=0)
- {
- temp=i;
- }
- else
- {
- limit++;
- }
- }
- cout<<temp<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement