求助关于double
查看原帖
求助关于double
681736
zhengjingtian楼主2024/8/24 14:53

double精度到十五位为什么这题过不了

#include<bits/stdc++.h>
using namespace std;
double a,b;
int main()
{
	cin>>a>>b;
	if(a==b)
		cout<<"YES";
	else if(abs(a-b)<1)
		cout<<"NO";
	else
		cout<<"YES";
	return 0;
}
2024/8/24 14:53
加载中...