哪位大佬看看```cpp
#include <bits/stdc++.h>
using namespace std;
int n,m;
bool cy(int x){
for(int e=1;e<=n;e++){
if(x==0)return false;
int y=x%n;
if(y!=m)return false;
x-=m;
x=x-x/n;
}
return true;
}
int main(){
cin>>n>>m;
for(int i=1;;i++){
if(cy(i)){
cout<<i<<endl;
break;
}
}
return 0;
}