```cpp
double eat = 1.0*s/t
```
by 小小蒲公英 @ 2023-10-09 14:13:27
对于一个double类型的变量,如果想让其赋值为两个int类型变量的商,前面乘上1.0可以让结果变为小数
by cinemaaa @ 2023-10-09 14:33:35
```cpp
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int m, t, s;
cin>>m>>t>>s;
if(!s){
cout<<m;
return 0;
}
int k = ceil(s*1.0/t);
if(m-k < 0){
cout<<0;
return 0;
}
cout<<m-k<<endl;
}
```
by cinemaaa @ 2023-10-09 14:34:07
@[cinemaaa](/user/1008115) @[小小蒲公英](/user/392816) 谢谢 通过了
by Lolaandd @ 2023-10-10 12:13:12