1 条题解
-
1
#include<bits/stdc++.h> using namespace std; int main(){ double a,b,c,t,x,y; cin>>a>>b>>c; t=b*b-4*a*c; x=(-b+sqrt(t))/(2*a);y=(-b-sqrt(t))/(2*a); if(t>0) printf("x1=%.5lf;x2=%.5lf",min(x,y),max(x,y)); if(t==0) printf("x1=x2=%.5lf",x); if(t<0) printf("No answer!"); return 0; }
- 1
信息
- ID
- 6910
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- 1
- 标签
- 递交数
- 5
- 已通过
- 5
- 上传者