数据点二为什么过不去
查看原帖
数据点二为什么过不去
244502
_Stay_楼主2021/10/10 09:35

我下载了数据,输入是:100 0 1

输出本应该是100的对吧,可是就是过不去

求助

下面贴上代码

#include<bits/stdc++.h>
using namespace std;
int main()
{
    double a,b,c;
	cin>>a>>b>>c;
	if(b==0 or c==0) cout<<a;
	else if(c/b>a or a==0) cout<<0;
	else if(c/b!=int(c/b)) cout<<a-1-floor(c/b);
	else cout<<a-c/b;
	return 0;
 }

2021/10/10 09:35
加载中...