Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
106859 | 胡海峰老师 | 07苹果和虫子 | C++ | Accepted | 0 MS | 268 KB | 212 | 2025-01-16 19:11:47 |
#include <iostream> using namespace std; int main() { int n,x,y; cin>>n>>x>>y; int res; res = n-y/x; if(y%x) res--; //res = res-1; if(res<0) res =0; cout<<res; return 0; }