为什么90分
  • 板块学术版
  • 楼主mzdzdc
  • 当前回复3
  • 已保存回复3
  • 发布时间2024/9/11 19:38
  • 上次更新2024/9/11 22:10:55
查看原帖
为什么90分
1394252
mzdzdc楼主2024/9/11 19:38

哪位大佬看看```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; }

2024/9/11 19:38
加载中...