A408.猴子吃桃题解:
2026-02-13 21:26:34
发布于:四川
0阅读
0回复
0点赞
A408.猴子吃桃
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,m,x=0;
cin>>n>>m;
for(int i=m;i<=n;i++){
if(n-m<0){
break;//直接跳出循环
}
n-=m;
x++;
m++;
}
cout<<x;
//不写return 0好习惯!(学的嘻嘻);
}
这里空空如也






有帮助,赞一个