80分求助,#4WA
查看原帖
80分求助,#4WA
774986
Bullets楼主2022/8/26 11:25

请大佬们不吝赐教QwQ

#include <cstdio>

int max(int a, int b)
{
	return a > b ? a : b;
}

int main()
{
	int m, t, s;
	scanf("%d%d%d", &m, &t, &s);
	
	if (t == 0)
	{
		printf("0");
		return 0;
	}
	int a = m - s / t;
	if (s % t != 0)
		a ++;
	int res = max(0, a);
	printf("%d", res);
	
	return 0;
}
2022/8/26 11:25
加载中...