80分求助(C++14(GCC 9))
查看原帖
80分求助(C++14(GCC 9))
920920
sym331楼主2023/1/3 14:40

大佬们,帮帮我,代码第二个测试点RE

#include<iostream>
using namespace std;
int main()
{
	int n,x,y,s,c;
	cin>>n>>x>>y;
	c=y/x;
	if(y<x*n)
	{
 		if(y%x!=0)
 		{
   			s=n-c-1;;
  		}
		else
  	 	{
    		s=n-c;
   		}
   		cout<<s<<endl;
   }
   else
   {
    	cout<<0<<endl;
   }
	return 0;
}
2023/1/3 14:40
加载中...