#include<iostream>
#include<algorithm>//可以不用加这个头文件
using namespace std;
int main()
{
int m,t,s;
cin >> m >> t >> s;
if (t == 0)//注意t为0时 瞬间吃完。
{
cout << 0 << endl;
return 0;
}
if (s % t == 0)//s刚好是t的倍数的情况
{
cout << max(m - s / t,0) << endl;//注意s时间内已经吃完所有苹果的情况
}
else
{
cout <<max( m - s / t - 1,0) << endl;
}
system("pause");
return 0;
}
P5709 苹果和虫子
最新推荐文章于 2024-07-22 10:02:43 发布