80分求助,第二个re
查看原帖
80分求助,第二个re
891562
Hayward楼主2022/11/27 18:36
#include<iostream>
using namespace std;
int main()
{
	int apples = 0;
	int min = 0;
	int time = 0;
	cin >> apples >> min >> time;
	int geshu = time / min;
	if (min == 0 )
	{
 		cout<<0<<endl;
		return 0;
	}
	if (time == 0)
	{
		cout << apples << endl;
		return 0;
	}
	if (time % min != 0)
	{
		geshu++; 
	}
	if (geshu > apples)
	{
		cout << 0 << endl;
		return 0;
	}
	cout << apples-geshu << endl;
}
2022/11/27 18:36
加载中...