纯找规律
第y小时剩的=n-(y/x)-1
AC code:
#include<bits/stdc++.h> using namespace std; int n,x,y; int main() { cin>>n>>x>>y; cout<<n-(y/x)-1; return 0; }
工作时间(吃了的时间)*工作效率(吃的速度)=工作总量(吃的总个数) 总个数-吃的总个数-1=完整的苹果 小学五年级数学题
#include <iostream> #include <cstdio> using namespace std; int main() { int n,x,y; cin>>n>>x>>y; int temp=y/x; cout<<n-temp-1; return 0; }
注册一个 codestar 通用账户,您就可以在我们提供的所有在线评测服务上提交代码、参与讨论。
使用您的 codestar 通用账户