c语言80分求助,为什么#2WA了
查看原帖
c语言80分求助,为什么#2WA了
1497402
asdfgWW123楼主2024/11/4 13:07

#include <stdio.h>

int main() {

int m,s,t,n;
scanf("%d %d %d",&m,&t,&s);      

if(t == 0)
{
	return 0;
}  else
{

	if (s % t ==0)
	{
		n = m - s / t;
		if(n >= 0) {printf("%d",n);}
		else  {printf("0");}	
	}  
	else
	{
		n = m - s / t - 1;
		if(n >= 0){printf("%d",n);}
		else  {printf("0");}
	}
}

return 0;

}```c

2024/11/4 13:07
加载中...