下载数据后本地能过,为啥提交就全WA
查看原帖
下载数据后本地能过,为啥提交就全WA
417018
dark_moon楼主2022/8/8 10:48
#include<bits/stdc++.h>
using namespace std;
int temp;
double a, b, c, d;
double f(double x){
	return a * x * x * x + b * x * x + c * x + d;
}
int main(){
	cin >> a >> b >> c >> d;
	for(double i = -100; i <= 100; i += 0.001){
		if(abs(f(i)) - 0 < 0.001){
			if(temp == 0)
			temp = 1;
			else
			printf(" ");
			printf("%.2llf", i);
		}
	}
	return 0;
}

qwq

2022/8/8 10:48
加载中...