求帮助
2025-11-29 19:16:28
发布于:浙江
19阅读
0回复
0点赞
呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜呜,做不出来了
全部评论 1
#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; //没吃完,由于是int直接向下取整 } } else{ if (n-(y/x+1)<=0){ cout<<0; } else{ cout<<n-(y/x+1); //没吃完,要+1 } } return 0; }2026-01-09 来自 山东
0谢谢你啦

[:

2026-01-09 来自 浙江
0










有帮助,赞一个