12 条题解
-
0
Guest
-
1
#include<bits/stdc++.h> using namespace std; int main() { double a,b,c,d,x1,x2; cin>>a>>b>>c; d=sqrt(b*b-4*a*c); x1=(-b+d)/(2*a); x2=(-b-d)/(2*a); if(x1>x2) { cout<<fixed<<setprecision(2)<<x2<<" "<<x1<<endl; } else { cout<<fixed<<setprecision(2)<<x1<<" "<<x2<<endl; } return 0; }
- 1
信息
- ID
- 20
- 时间
- 1000ms
- 内存
- 256MiB
- 难度
- 7
- 标签
- 递交数
- 338
- 已通过
- 73
- 上传者