这不就是那个“苹果和虫子”吗?
2025-08-10 18:30:50
发布于:浙江
0阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main(){
int n,x,y;
cin>>n>>x>>y;
if (y%x==0){
if (n-y/x<=0){
cout<<0;
}
else{
cout<<n-y/x;
}
}
else{
if (n-(y/x+1)<=0){
cout<<0;
}
else{
cout<<n-(y/x+1);
}
}
return 0;
}
这里空空如也
有帮助,赞一个