80分。。。
查看原帖
80分。。。
760455
SZH0523楼主2022/8/23 21:59

请大佬看一看哪错了???

#include <bits/stdc++.h>
using namespace std;
signed main()
{
    int m,t,s,a;
	cin >> m >> t >> s;
	if (t==0)
	{
		a = 0;
		cout << a << endl;
	}
	else if (s%t>0)
	{
		a = m-s/t-1;
		cout << a << endl;
	}
	else if (s/t>m)
	{
		cout << 0;
	}
	else
	{
		a = m-s/t;
		cout << a;
	}
	return 0;
}
2022/8/23 21:59
加载中...