Translate this program to python

translate this into python…

#include<iostream.h>
main()

{
      int t;
    
      unsigned long long x,n,noc;
      cin>>t;
      while(t--)
      {
        cin>>x>>n;
        noc=x;
        while(noc>=n)
        {
          x++;
          noc=noc-n+1;
        }
        cout<<x<<"\n";
      }
      return 0;
}

see this code…LINK!!!

this may be giving the correct ans…but it seems it will exceed the time limit!!!

yupp … it did :stuck_out_tongue:

//