第二个过不去错误是为什么啊急死了
查看原帖
第二个过不去错误是为什么啊急死了
874765
852810242_121楼主2023/4/21 18:34
#include"iostream"
#include"cmath"
#include"algorithm"
using namespace std;
int main()
{
	int t, s;
	int m;
	cin >> m >> t >> s;
	if (t == 0)
	{
		cout << m << endl;
	}
	else
	{
		
		if (s % t == 0)
		{
			int x;
			x = s/ t;
		cout << max(m-x,0)<< endl;
		}
		else
		{
			int x;
			x = s / t + 1;
		cout << max(m-x ,0)<< endl;
		}
	}
	return 0;
}
2023/4/21 18:34
加载中...