80分求助 谢谢各位大神
  • 板块题目总版
  • 楼主freddy2012
  • 当前回复3
  • 已保存回复3
  • 发布时间2022/7/12 18:34
  • 上次更新2023/10/27 20:49:06
查看原帖
80分求助 谢谢各位大神
750410
freddy2012楼主2022/7/12 18:34

萌新求助!!! 此题为:P5709

——————————————————

以下为代码:

#include<bits/stdc++.h>
using namespace std;

int main()
{
    int m,t,s;
	cin >> m >> t >> s;
	if (t == 0)
	{
		cout << 0 << endl;
	}
	if (s % t == 0)
	{
		cout << max(m-s/t,0) << endl;
	}
	else
	{
	    cout << max(m-s/t-1,0) << endl;	    
	}

	return 0;
}
2022/7/12 18:34
加载中...