80分WA1,检查不出哪错了,求指点
查看原帖
80分WA1,检查不出哪错了,求指点
1445147
Aphasia3517650240楼主2024/10/28 16:27
#include<iostream>
#include<cmath>
using namespace std;
int main() {
	int m, t, s;
	cin >> m >> t >> s;
	if (t == 0)cout << 0;
	else if (s % t != 0) cout << m - ceil(double(s) / t);
	else if (s * 1.0 / t >= m)cout << 0;
	else cout << m - (s * 1.0 / t);
	return 0;
}

2024/10/28 16:27
加载中...