semeru/Code-Code-CloneDetection-POJ104 huggingface dataset:
main()
{
      int n,i;
      float a,b,c,delta;
      scanf("%d",&n);
      for(i=0;i<n;i++)
      {
          scanf("%f %f %f",&a,&b,&c);
          delta=b*b-4*a*c;
          if(fabs(delta)<1e-8)
          { if(fabs(b)<1e-8)
              printf("x1=x2=%.5f\n",-b/(2*a)+1e-8);
            else
              printf("x1=x2=%.5f\n",-b/(2*a));}
          if(delta>1e-8)
            printf("x1=%.5f;x2=%.5f\n",(-b+sqrt(delta))/(2*a)+1e-8,(-b-sqrt(delta))/(2*a)+1e-8);
          if(delta<-1e-8)
          {
            if(a>0)
            { if(fabs(b)<1e-8)
                printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a)+1e-8,sqrt(-delta)/(2*a),-b/(2*a)+1e-8,sqrt(-delta)/(2*a));
              else printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a),sqrt(-delta)/(2*a),-b/(2*a),sqrt(-delta)/(2*a));}
            else
            { if(fabs(b)<1e-8)
                printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a)+1e-8,-sqrt(-delta)/(2*a),-b/(2*a)+1e-8,-sqrt(-delta)/(2*a));
              else printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a),-sqrt(-delta)/(2*a),-b/(2*a),-sqrt(-delta)/(2*a));}
          }
      }
    
      return 0;
}
main()
{
    int n,i;
    double a[100],b[100],c[100],d,x1,x2;
    scanf("%d",&n);
    for(i=1;i<=n;i++)
    {
        scanf("%lf %lf %lf",&a[i],&b[i],&c[i]);
    }
    for(i=1;i<=n;i++)
    {
        if((b[i]*b[i]-4*a[i]*c[i])>=0)
        {d=sqrt(b[i]*b[i]-4*a[i]*c[i]);
         if(d<=0.0000001&&d>=-0.0000001)
         {x1=(-b[i])/(2*a[i]);
          printf("x1=x2=%.5f\n",x1);}
         else
          {x1=(-b[i]+d)/(2*a[i]);
           x2=(-b[i]-d)/(2*a[i]);
           printf("x1=%.5f;x2=%.5f\n",x1,x2);}}
        else
          {d=sqrt(-b[i]*b[i]+4*a[i]*c[i]);
           printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",0-b[i]/(2*a[i]),d/(2*a[i]),0-b[i]/(2*a[i]),d/(2*a[i]));}
    }
}
int main ()
{
	double a,b,c,t;
	double x1,x2;
	int n,i;

	cin>>n;
	for(i=1;i<n+1;i++)
	{
		cin>>a>>b>>c;
		t=-b/(2*a);
		if(fabs(b*b-4*a*c)<1e-9)
			printf("x1=x2=%.5f\n",-b/(2*a));
			else if((b*b-4*a*c)>0)
		{
			x1=(-b+sqrt(b*b-4*a*c))/(2*a);
		    x2=(-b-sqrt(b*b-4*a*c))/(2*a);
			
			printf("x1=%.5f;x2=%.5f\n",x1,x2);
		}
		else
{
            if(fabs(t)<1e-9)
				t=0;
			printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n", t, sqrt(-(b*b-4*a*c))/(2*a),t,sqrt(-(b*b-4*a*c))/(2*a));}
	}
	return 0;
}
int main()
{
    int n,m;
    double x1,x2,p,q;
    scanf("%d",&n);
    for(m=0;m<n;m++)
{
   double a,b,c;
    scanf("%lf %lf %lf",&a,&b,&c);
   if(b*b-4*a*c>0)
      {
      x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
      x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
      printf("x1=%.5f;x2=%.5f\n",x1,x2);
      }   
    else
     { if (b*b-4*a*c==0)
      {
       x1 = (-b + sqrt(b*b-4*a*c))/(2*a);
       printf("x1=x2=%.5f\n",x1);
      }
      else
     {
           p=(-b)/(2*a);
           q=(sqrt(-b*b+4*a*c))/(2*a);
           if(fabs(p)<0.00001)
           p=0.00000;
           printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",p,q,p,q);
      }
     }
     }
}
void main()
{   int n,i;
    double a,b,c,d,e,x1,x2;
	scanf("%d",&n);
    for(i=0;i<n;i++)
	{   scanf("%lf %lf %lf",&a,&b,&c);
	    if(b*b-4*a*c>0.0000000001)
		{  d=(-b+sqrt(b*b-4*a*c))/(2*a);
		   e=(-b-sqrt(b*b-4*a*c))/(2*a);
		   printf("x1=%.5lf;x2=%.5lf\n",d,e);
		}
		else if(b*b-4*a*c<=0.0000000001 && b*b-4*a*c>=-0.0000000001 )
		{  d=(-b)/(2*a);
		   e=(-b)/(2*a);
		   printf("x1=x2=%.5lf\n",d);
		}
		else 
		{  d=-b/(2*a);
		   e=sqrt(4*a*c-b*b)/(2*a);
		   printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",
			  d,e,d,e);
		}
    }
}
/*
???:????????
???:??
????:2011.9.16
*/
int main()                                                            //???
{                                                                     //?????
	int n,num;                                                        
	double a,b,c,d,e,f;
	cin >> num;                                                       //??????
	for(n=0; n<num; n++) 
	{                                                                 //????
		cin >> a >> b >> c ;                                          //??????
		d = b * b - 4 * a * c;                                        //?????
		e = ( 0 - b )/( 2 * a );
		cout << fixed << setprecision(5);                             //??????????????5?
		if(d==0)                                                      //??????0???????
			cout << "x1=x2=" << e << endl;
	    else                                                          //???????0????????
		{
			if(d>0)                                                   //??????0????????
			{
				f = sqrt ( d )/( 2 * a );
				cout << "x1=" << e + f << ";" << "x2=" << e - f << endl;
			}
			else                                                      //??????0????????
			{
					f = sqrt ( -d )/( 2 * a );
					cout << "x1=" << e << "+" << f << "i" << ";" << "x2=" << e << "-" << f << "i" << endl;
			}
		}
	}
	    return 0;
}                                                                      //?????
int main()
{
	int k;
	double a , b , c , x1 , x2 , m ,n;
	cin >> k ;
	for(int i=1 ; i <= k ; i++)
	{
	cin >> a >> b >> c;
	if(b*b-4*a*c == 0)
	{
		cout << fixed;
		cout << setprecision(5) << "x1=x2=" << (-b)/(2*a) << endl;
	}
	else
		if(b*b-4*a*c > 0)
		{
			x1 = (-b + sqrt(b * b - 4 * a * c)) / (2 * a);
            x2 = (-b - sqrt(b * b - 4 * a * c)) / (2 * a);
			cout << fixed;
			cout << setprecision(5) << "x1=" << x1 << ";" << "x2=" << x2 << endl;
		}
		else
		{
			
			m = (-b) / (2 * a);
			n = sqrt(-b * b + 4 * a * c) / (2 * a);
			if(m != 0)
			{
				cout << fixed;
				cout << setprecision(5) << "x1=" << m << "+" << n << "i" << ";" << "x2=" << m << -n << "i" << endl;
			}
			else
			{
                cout << fixed;
				cout << setprecision(5) << "x1=" << "0.00000" << "+" << n << "i" << ";" << "x2=" << "0.00000" << -n << "i" << endl;
			}

			
		}
	}
	return 0;
}
void main()
{
	double a,b,c,d,r,h,x1,x2;
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%lf %lf %lf",&a,&b,&c);
		d=b*b-4*a*c;
		r=(-b)/(2*a);
		if(fabs(d)<=(1e-6))
		{
			x1=r;
			printf("x1=x2=%.5lf\n",x1);
		}
		else if(d>1e-6)
		{
			x1=r+sqrt(d)/(2*a);
			x2=r-sqrt(d)/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if(d<1e-6)
		{
			h=sqrt(-d)/(2*a);		
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",r,h,r,h);
		}
	}
}
int main() {
	int n;
	scanf("%d", &n);

	for (int i = 0; i < n; ++i) {
		double a, b, c;
		scanf("%lf%lf%lf", &a, &b, &c);
		double delta = b*b - 4*a*c;

		double x1, x2;
		if (delta > 0) {
			x1 = (-b + sqrt(delta)) / (2*a);
			x2 = (-b - sqrt(delta)) / (2*a);
			if (x1 == 0.0)
				x1 = 0.0;
			if (x2 == 0.0)
				x2 = 0.0;

			printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
		else if (delta == 0) {
			x1 = -b / (2*a);
			if (x1 == 0.0)
				x1 = 0.0;
			printf("x1=x2=%.5lf\n", x1);
		}
		else {
			double real, imag;
			real = -b / (2*a);
			if (real == 0.0)
				real = 0.0;
			imag = sqrt(-delta) / (2*a);
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", real, imag, real, imag);
		}
	}
}
int main()
{
	int n; 
	double a[100];
	double b[100];
	double c[100];
	double d,x1[100],x2[100],e,f;
	int j;
	scanf("%d",&n);
	for(j=0;j<n;j++)
	{
		scanf("%lf%lf%lf",&a[j],&b[j],&c[j]);
	}
	for (j=0;j<n;j++)         
	{	
		d=b[j]*b[j]-4*a[j]*c[j];
		if(d>0)
		{
			x1[j]=(-b[j]+sqrt(d))/(2*a[j]);
			x2[j]=(-b[j]-sqrt(d))/(2*a[j]);
			printf("x1=%.5lf;x2=%.5lf\n",x1[j],x2[j]);
		}
		else if (d==0)
		{
			x1[j]=x2[j]=-b[j]/(2*a[j]);
			printf("x1=x2=%.5lf\n",x1[j]);				
		}
			else
			{
				e=-b[j]/(2*a[j]);
				f=sqrt(-d)/(2*a[j]);
				printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",e,f,e,f);
			}
	}
	return 0;
}
double x1 ( double a , double b , double c ){
	double x11 ;
	double det = b*b-4*a*c ;
	if ( det >= 0 ) x11 = (-b + sqrt(det))/(2*a);
	else x11 = sqrt(-det)/(2*a);
	return(x11);
}

double x2 ( double a , double b , double c ){
	double x22;
	double det = b*b-4*a*c ;
	if(det >= 0) x22 = (-b - sqrt(det)) / (2*a);
	else x22 = sqrt(-det)/(2*a);
	return(x22);
}

int main(){
	int n , i;
	double det;
	double a[100] , b[100] , c[100];
	scanf("%d" , &n );
	for( i = 1 ; i <= n ; i++ ){
		scanf("%lf%lf%lf\n" , &a[i] , &b[i] , &c[i]);
	}
	for( i = 1 ; i <= n ; i++ ){
			//printf("%.5f %.5f %.5f \n" , a[i] , b[i] , c[i]);
	    det = b[i] * b[i] - 4 * a[i] * c[i] ;
		if( det >= 0 && x1( a[i] , b[i] , c[i] ) != x2( a[i] , b[i] , c[i] ) ) printf( "x1=%.5f;x2=%.5f\n" , x1( a[i] , b[i] , c[i] ) , x2( a[i] , b[i] , c[i]));
		else if( det >= 0 ) printf( "x1=x2=%.5f\n" , x1( a[i] , b[i] , c[i] ) );
		else if( b[i] != 0) printf( "x1=%.5f+%.5fi;x2=%.5f-%.5fi\n" , -b[i] / (2*a[i]) , x1( a[i] , b[i] , c[i]) , -b[i] / (2*a[i]) , x2( a[i] , b[i] , c[i] ) );
		else printf( "x1=%.5f+%.5fi;x2=%.5f-%.5fi\n" , b[i] / (2*a[i]) , x1( a[i] , b[i] , c[i]) , b[i] / (2*a[i]) , x2( a[i] , b[i] , c[i] ) );
		//printf("%.5f\n %.5f",b[i] / (2 * a[i]) , b[i] );
	}
	return(0);
	
}
int main()
{
	int n=0;
	float a[10];
	float b[10];
	float c[10];
	double x1[10];
	double x2[10];
	int j;

    scanf("%d",&n);
	for(j=0;j<n;j++)
	{
		scanf("%f %f %f\n",&a[j],&b[j],&c[j]);
	}

	for(j=0;j<n;j++)
	{
		if((b[j]*b[j]-4*a[j]*c[j])>0)
		{
        x1[j]=(-b[j] + sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
		x2[j]=(-b[j] - sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
		printf("x1=%.5lf;x2=%.5lf\n",x1[j],x2[j]);
		}
		
		
		if((b[j]*b[j]-4*a[j]*c[j])==0)
		{
        x2[j]=(-b[j] + sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
		printf("x1=x2=%.5lf\n",x2[j]);
		}


		if((b[j]*b[j]-4*a[j]*c[j])<0) 
		{
			double m;
			double n;
			m=-b[j]/(2*a[j]);
			n=sqrt(4*a[j]*c[j]-b[j]*b[j])/(2*a[j]);
		printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",m,n,m,n);
		}
	}
	return 0; 
}
int main(int argc, char* argv[])
{
	int n;
	scanf("%d",&n);
	double x1=0, x2=0, a, b, c, i, j, k, d, e; 
	for(i=1, j=1, k=1;i<=n, j<=n, k<=n;i++, j++, k++)
	{
	 scanf("%lf%lf%lf",&a, &b, &c);
     x1 = (-b + sqrt(b*b-4*a*c))/(2*a); 
     x2 = (-b - sqrt(b*b-4*a*c))/(2*a);
	 if(((x1)*(x2)>=0)&&((x1)!=(x2)))
	 {
	   printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
	 }
	 else if(((x1)*(x2)>=0)&&((x1)=(x2)))
	 {
		 printf("x1=x2=%.5lf\n", x1);
	 }
	 else
	 {
         d=-(b/(2*a));
		 e=sqrt(4*a*c-b*b)/(2*a);
		 printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", d, e, d, e);
	 }
	}
	return 0;
}
//By Dr.Z


int solve(float a,float b,float c);     //????

int main()
{

cout<<fixed<<setprecision(5);

int n,i,j;   //????
cin>>n;     //?????n

float S[n][3];     //????????

for(i=0;i<=(n-1);i++)                        //??????
{
for(j=0;j<=2;j++) cin>>S[i][j];
}

for(i=0;i<=(n-1);i++)
{
solve(S[i][0],S[i][1],S[i][2]);
}
return 0;
}

int solve(float a,float b,float c)
{
float d=(b*b-4*a*c);    //?????delta
float x,y;        //??????

if(d>0)          //?????
{
d=sqrt(d);
x=-b/a/2;
y=d/a/2;
cout<<"x1="<<(x+y)<<";x2="<<(x-y)<<endl;
}
else if(d==0)   //????? 
{
cout<<"x1=x2="<<(-b/a/2)<<endl;
}
else           //????? 
{
d=sqrt(-d);
x=-b/a/2;
if(x==0) x=abs(x);
y=abs(d/a/2);
cout<<"x1="<<x<<"+"<<y<<"i;x2="<<x<<"-"<<y<<"i"<<endl;
}

return 0;
}
int main(int argc, char* argv[])
{
	double x1,x2,a,b,c,s,q,w;
	int n,j;
	scanf("%d",&n);
	for(j=1;j<=n;j++)
	{scanf("%lf%lf%lf",&a,&b,&c);
	s=b*b-4*a*c;
	if(s>0)
	{x1=(-b + sqrt(s))/(2*a);
	x2=(-b - sqrt(s))/(2*a);
	printf("x1=%.5lf;x2=%.5lf\n",x1,x2);}
	else if(s==0)
	{{if(b==0)
		x1=x2=0;
	else
		x1=x2=-b/(2*a);}

	printf("x1=x2=%.5lf\n",x1); }
	else 
	{
		q=-b/(2*a);
	w=sqrt(-s)/(2*a);
	{if(b==0)
		printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",q,w,q,w);
	else

		
		
		printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",q,w,q,w);}}
	}


	return 0;
}
int main()
{
	double n, x1, x2, a, b, c, i, delta;
	cin >> n;
	for (i = 1; i <= n; i ++)
	{
		cin >> a >> b >> c;
		delta = b * b - 4 * a * c;
		if (delta == 0)
		{
			x1 = x2 = (double)(- b / (2 * a));
			printf("x1=x2=%.5lf\n", x1);
		}
		else if(delta > 0)
		{
			x1 = (double)(-b + sqrt(delta))/(2 * a);
			x2 = (double)(-b - sqrt(delta))/(2 * a);
			printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
		else if (delta < 0)
		{
			delta = - delta;
			double i, x;
			i = sqrt(delta) / (2 * a);
			x = -b / (2 * a);
			if (x == - 0)
				x = 0;
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n", x, i, x, i);
		}
	}
	return 0;
}
int main()
{
	int n, i;
	double a, b, c, x1, x2;
	cin >> n;
	for( i = 1; i <= n; i++)
	{
		cin >> a >> b >> c;
		if(b * b - 4 * a * c > 0)
		{
		   	x1 = (-b + sqrt(b *b - 4 * a * c))/(2 * a);
            x2 = (-b - sqrt(b *b - 4 * a * c))/(2 * a);  
			if(x1 == -0)
			{
				x1 = 0;
			}
			if(x2 == -0)
			{
				x2 = 0;
			}
		    cout << fixed;
		    cout << "x1=" << setprecision(5) << x1 << ";" << "x2=" << setprecision(5) << x2 << endl;
		}
        if(b * b - 4 * a * c == 0)
		{
			x1 = (-b)/(2 * a);
			if(x1 == -0)
			{
				x1 = 0;
			}
			cout << fixed;
			cout << "x1=x2=" << setprecision(5) << x1 << endl;
		}
		if(b * b - 4 * a * c < 0)
        {
			x1 = (-b)/(2 * a);
			x2 = sqrt(4 * a * c - b * b)/(2 * a);
			if(x1 == -0)
			{
				x1 = 0;
			}
			if(x2 == -0)
			{
				x2 = 0;
			}
			cout << fixed;
			cout << "x1=" << setprecision(5) << x1 << "+" << setprecision(5) << x2 << "i" << ";" << "x2=" << setprecision(5) << x1 << "-" << setprecision(5) << x2 << "i" <<endl;
		}
	}
	return 0;
}
//?????????

int main()
{
	int n, i;
	double a, b, c, x1, x2, real, imaginary;

	scanf ("%d", &n);
	for (i=1; i<=n; i++){
		scanf("%lf %lf %lf", &a, &b, &c);

		if((b*b-4*a*c)>0){
			x1=(-b+sqrt(b*b-4*a*c))/(2*a);
			x2=(-b-sqrt(b*b-4*a*c))/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n", x1, x2);
		}
		else if((b*b-4*a*c)==0){
			x1=(-b+sqrt(b*b-4*a*c))/(2*a);
			printf("x1=x2=%.5lf\n", x1);
		}
		else{
			imaginary=(sqrt(-b*b+4*a*c))/(2*a);
			real=(-b/(2*a))+1-1;
			if(imaginary>=0){
				printf("x1=%.5lf+%.5lfi;", real, imaginary);
				printf("x2=%.5lf-%.5lfi\n", real, imaginary);
			}
			else{
				imaginary=(-imaginary);
				printf("x1=%.5lf-%.5lfi;", real, imaginary);
				printf("x2=%.5lf+%.5lfi\n", real, imaginary);
			}
		}
	}

	return 0;
}
float derta(float x,float y,float z)
{
	return(y*y-4*x*z);
}

void main()
{
	float a,b,c;
	int n,i;
	scanf("%d",&n);
	for(i=0;i<n;i++)
	{
		scanf("%f%f%f",&a,&b,&c);
		if(a!=0)
		{
			if(derta(a,b,c)==0)
			{
				printf("x1=x2=%.5f\n",-b/(2*a));
			}
			else if(derta(a,b,c)>0)
			{
				printf("x1=%.5f;x2=%.5f\n",(-b+sqrt(derta(a,b,c)))/(2*a),(-b-sqrt(derta(a,b,c)))/(2*a));
			}
			else 
			{
				if(-b/(2*a)==0)
					printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",fabs(-b/(2*a)),sqrt(-derta(a,b,c))/(2*a),fabs(-b/(2*a)),sqrt(-derta(a,b,c))/(2*a));
				else
					printf("x1=%.5f+%.5fi;x2=%.5f-%.5fi\n",-b/(2*a),sqrt(-derta(a,b,c))/(2*a),-b/(2*a),sqrt(-derta(a,b,c))/(2*a));
			}
		}
		else printf("ERROR\n");
	}
}
//**************************************
//* ???????????? **
//* ?????? 1300012722 **
//* ???2013.10.10 **
//**************************************
int main()
{
	int n , i=1 ;                           //?????????n
	double a , b , c , x1 , x2 , delta , m;     //????ax2 + bx + c =0????????????x1?x2?b*b-4*a*c??,-b/(2*a)d??m
	cin >> n ;                              //??n??

	while (i<=n)
	{ 
		cin >> a >> b >> c ;                //???????
		delta= b * b - 4 * a * c;           //??delta??
			if(delta > 0)

			{
				x1 = ( 0 - b + sqrt(delta) ) / (2 * a) ;       //??x1??
                x2 = ( 0 - b - sqrt(delta) ) / (2 * a) ;       //??x2?? 
                cout << fixed ;
	            cout << setprecision(5) <<  "x1=" << x1 << ";" << "x2=" << x2 << endl ;        //??x1,x2??????????5?
			}
			else if(delta==0)                                                       
			{
				m = (0 - b) / ( 2 * a ) ;                                                            //??x1?x2??
				cout << fixed ;
	            cout << setprecision(5) <<  "x1=x2=" << m << endl ;                           //??x1,x2??????????5?
			}

		    else if(delta<0)                                                                    
			{
				m= (0 - b) / ( 2 * a ) ;
				cout << fixed ;
                cout << setprecision(5) << "x1=" << m << "+" << sqrt(-delta) / (2*a) << "i" << ";" ;  //??x1??
				cout << setprecision(5) << "x2=" << m << "-" << sqrt(-delta) / (2*a) << "i" << endl;  //??x2??
			}

		i++;          //i???1
	}	

	return 0;
}
int main()
{
	int n,ni;
	cin>>n;
    for(ni=1;ni<=n;ni=ni+1)
	{
		double a,b,c,x1,x2,t;
		cin>>a>>b>>c;
		t=(-b)/(2*a);
		if(fabs(t) < 1e-9)
         t= 0;
		if (b*b-4*a*c>0)
		{
			cout<<"x1=" ;
            printf("%.5f",(t + sqrt(b*b-4*a*c)/(2*a)));
            cout<<";";
		    cout<<"x2=";
            printf("%.5f",(t - sqrt(b*b-4*a*c)/(2*a)));
            cout<<endl;
        }
		else if (b*b-4*a*c==0)
		{
			cout<<"x1=x2=";
            printf("%.5f", t);
            cout<<endl;
		}
		else
        {   
			cout<<"x1=";
            printf("%.5f", t);
            cout<<"+";
            printf("%.5f",(sqrt(4*a*c-b*b)/(2*a)));
            cout<<"i;";
		    cout<<"x2=";
            printf("%.5f",t);
            cout<<"-";
            printf("%.5f",(sqrt(4*a*c-b*b)/(2*a)));
            cout<<'i'<<endl;
		}
	}
	return 0;
}
int main()
{
    int num;
    double *d,*e,*f,x1,x2,x3,x4,a,b,c;
    scanf("%d",&num);
    d=(double *)malloc(num*sizeof(double));
    e=(double *)malloc(num*sizeof(double));
    f=(double *)malloc(num*sizeof(double));
    int i;
    for(i=0;i<num;i++)
    {
        scanf("%lf %lf %lf",d+i,e+i,f+i);
    }
    for(i=0;i<num;i++)
    {
        a=d[i];
        b=e[i];
        c=f[i];
        if(b*b-4*a*c>0)
        {
            x1 = (-b + sqrt(b*b-4*a*c))/(2*a)+0;
            x2 = (-b - sqrt(b*b-4*a*c))/(2*a)+0;
            printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
        }
        if(b*b-4*a*c==0)
        {
            x1 = (-b)/(2*a)+0;
            printf("x1=x2=%.5lf\n",x1);
        }
        if(b*b-4*a*c<0)
        {
            x1 = (-b)/(2*a)+0;
            x2 = (-b)/(2*a)+0;
            x3=sqrt(-b*b+4*a*c)/(2*a);
            x4=sqrt(-b*b+4*a*c)/(2*a);
            printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",x1,x3,x2,x4);
        }
    }
    return 0;
}
/*
 * 1.cpp
 *
 *  Created on: 2012-10-12
 *      Author: 99003
 */
int main(){
	int n;
	double a,b,c,delta;
	double x1,x2;
	cin>>n;//??????
	while(n>0){
		cin>>a>>b>>c; //??3???
		delta=b*b-4*a*c;//??delta
		if(delta>0){ //?????
			x1=(0.000-b+sqrt(delta))/2.0/a;
			x2=(0.000-b-sqrt(delta))/2.0/a;
			cout<<"x1=";//????
			printf("%.5f",x1);
			cout<<";x2=";
			printf("%.5f",x2);
			cout<<endl;
		}
		else if(delta==0){ //??????
			x1=(0.00000000000000-b)/2/a;
			cout<<"x1=x2=";
			printf("%.5f",x1);
			cout<<endl;
		}
		else if(delta<0){ //??????
			x1=(0.00000000000000-b)/2/a;
			x2=sqrt(0.000000000000-delta)/2/a;
			cout<<"x1=";
			printf("%.5f",x1);
			cout<<"+";
			printf("%.5f",x2);
			cout<<"i;x2=";
			printf("%.5f",x1);
			cout<<"-";
			printf("%.5f",x2);
			cout<<"i"<<endl;
		}
		n=n-1;
		}
	return 0;
}
int main()
{
	int n;
	cin>>n;
	for(int i=0;i<n;i++)
	{
		double a,b,c;
		cin>>a>>b>>c;
		double delta,x1,x2;
		delta=b*b-4*a*c;
		if(delta>0)
		{
		x1 = (-b + sqrt(b*b-4*a*c))/(2*a) ;
		x2 = (-b - sqrt(b*b-4*a*c))/(2*a) ;
		cout<<"x1=";
		printf("%.5f", x1);
		cout<<";x2=";
		printf("%.5f",x2);
		cout<<endl;
		}
		else if(delta==0)
		{
			x1=(-b + sqrt(b*b-4*a*c))/(2*a) ;
			cout<<"x1=x2=";
			printf("%.5f", x1);
			cout<<endl;
		}
		else if(delta<0)
		{
			x1 = (-b)/(2*a) ;
			if(x1>-0.00001&&x1<=0)
				x1=-x1+0.0000001;
			double i;
			i=sqrt(-delta)/(2*a);
			cout<<"x1=";
			printf("%.5f", x1);
			cout<<"+";
			printf("%.5f", i);
			cout<<"i;x2=";
						printf("%.5f", x1);
						cout<<"-";
						printf("%.5f", i);
						cout<<"i"<<endl;
		}

	}
	return 0;
}
int main()
{
	int n,j;
	double a[20],b[20],c[20],x1[20],x2[20];
	scanf("%d",&n);
	for(j=0;j<=n-1;j++)
	{
		scanf("%lf%lf%lf",&a[j],&b[j],&c[j]);
	}
	for(j=0;j<=n-1;j++)
	{
		if(b[j]*b[j]-4*a[j]*c[j]>=0){
			if(b[j]*b[j]-4*a[j]*c[j]>0){
				x1[j]=(-b[j]+sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
		        x2[j]=(-b[j]-sqrt(b[j]*b[j]-4*a[j]*c[j]))/(2*a[j]);
		        printf("x1=%.5lf;x2=%.5lf\n",x1[j],x2[j]);
			}else {
				x1[j]=x2[j]=-b[j]/(2*a[j]);
				printf("x1=x2=%.5lf\n",x1[j]);
				}
		}		
		else {x1[j]=-b[j]/(2*a[j]);x2[j]=sqrt(4*a[j]*c[j]-b[j]*b[j])/(2*a[j]);if(-b[j]/(2*a[j])!=0){
		      printf("x1=%.5lf",x1[j]);printf("+");printf("%.5lf",x2[j]);printf("i;");
              printf("x2=%.5lf",x1[j]);printf("-");printf("%.5lf",x2[j]);printf("i\n");}
		      else{printf("x1=%.5lf",-x1[j]);printf("+");printf("%.5lf",x2[j]);printf("i;");
              printf("x2=%.5lf",-x1[j]);printf("-");printf("%.5lf",x2[j]);printf("i\n");}
		}
	}
	return 0;
}
int main()
{
 double a,b,c,p,p1,x1,x2,y1,z;
 int n,i;
 scanf("%d",&n);
 for(i=0;i<n;i++)
 {
  scanf("%lf%lf%lf",&a,&b,&c);
  p=b*b-4*a*c;
  if(p>0)
  {
   x1=(-b+sqrt(p))/(2*a);
   x2=(-b-sqrt(p))/(2*a);
   printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
  }
  else if(p==0)
  {
   x1=(-b)/(2*a);
   x2=(-b)/(2*a);
   printf("x1=x2=%.5lf\n",x1);
  }
  else
  {
   p1=-p;
   y1=-b/(2*a);
   z=sqrt(p1)/(2*a);
   printf("x1=%.5lf+%.5lfi;",y1,z);
   printf("x2=%.5lf-%.5lfi\n",y1,z);
  }
 }
 return 0;
}
int main()
{int i,n;
float a,b,c,d;
double disc,x1,x2,rpart,ipart;
scanf("%d",&n);
for(i=1;i<=n;i++)

{scanf("%f %f %f",&a,&b,&c); 
disc=b*b-4*a*c;
d=-b/(2*a);
if(fabs(disc)<=1e-6)
{printf("x1=x2=%.5lf\n",d);
}
else 
if(disc>1e-6)
{x1=(-b+sqrt(disc))/(2*a); 
x2=(-b-sqrt(disc))/(2*a); 
printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
}
else
{rpart=-b/(2*a);
ipart=sqrt(-disc)/(2*a);
printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",rpart,ipart,rpart,ipart); 
}
}
return 0;
}
int main(int argc, char* argv[])
{
	int n,j;
	scanf("%d",&n);
	for(j=1;j<=n;j++){
		double a,b,c,d,e,x1,x2;
		scanf("%lf%lf%lf",&a,&b,&c);
		d=b*b-4*a*c;
		e=-(b/(2*a));
		if(d>0){
			x1=e+(sqrt(d))/(2*a);
			x2=e-(sqrt(d))/(2*a);
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		if(d==0){
			x1=e;
			printf("x1=x2=%.5lf\n",x1);
		}
		if(d<0){
			d=-d;
			if(b!=0){
			
			printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",e,(sqrt(d))/(2*a),e,(sqrt(d))/(2*a));
			}
			if(b==0){ 
				
				printf("x1=%.5lf+%.5lfi;x2=%.5lf-%.5lfi\n",b,(sqrt(d))/(2*a),b,(sqrt(d))/(2*a));
			}
		}

	}

	return 0;
}
/*
 * ?????????.cpp
 *
 *  Created on: 2013-9-30
 *      Author: 111
 */

int main()
{
	int n;                                    //????
	double a,b,c,x1,x2,shibu,xubu,delt;
	cin>>n;
	for (int i=1;i<=n;i++)                    //?n?????
	{
		cin>>a>>b>>c;
		delt=b*b-4*a*c;                       //delt????
		if (delt>0)
		{
			x1=(-b+sqrt(delt))/(2*a);
			x2=(-b-sqrt(delt))/(2*a);         //??????????
			cout<<fixed<<setprecision(5);     //????5???
			cout<<"x1="<<x1<<";"<<"x2="<<x2<<endl;
		}
		else
		{
			if (delt==0)
			{                                 //??????????
				x1=-b/(2*a);
				x2=-b/(2*a);
				cout<<fixed<<setprecision(5);
				cout<<"x1=x2="<<x1<<endl;
			}
			else
			{
				shibu=-b/(2*a);                //??????
				xubu=sqrt(-delt)/(2*a);
				cout<<fixed<<setprecision(5);
				if (shibu==-0)
				{
					shibu=0;
				}
				cout<<"x1="<<shibu<<"+"<<xubu<<"i;"<<"x2="<<shibu<<"-"<<xubu<<"i"<<endl;
			}
		}
	}
	return 0;
}
void main()
{
	int i,n;
	scanf("%d/n",&n);
	double x1,x2,a,b,c,x,y;
	for (i=0;i<n;i++)
	{
		scanf("%lf%lf%lf\n",&a,&b,&c);
		x=(sqrt(b*b-4*a*c))/(2*a);
		if (x>0)
		{
			x1=-b/(2*a)+x;
			x2=-b/(2*a)-x;
			printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
		}
		else if (x==0)
		{
			x1=-b/(2*a);
			printf("x1=x2=%.5lf\n",x1);
		}
		else 
		{
			
y=(sqrt(-b*b+4*a*c))/(2*a);
x1=-b/(2*a);
			printf("x1=%.5lf",x1);
			printf("+%.5lf",y);
			printf("i;");
			printf("x2=%.5lf",x1);
			printf("-%.5lf",y);
printf("i\n");
		}
	}
}
int main(int argc, char* argv[])
{ 
 float a[50],b[50],c[50];
 int n,i;
 scanf("%d",&n);
 for(i=0;i<n;i++){
	 scanf("%f %f %f",&a[i],&b[i],&c[i]);
 }
 for(i=0;i<n;i++) {
	 if(a[i]!=0){
	double delta,m,n,x1,x2;
     delta=b[i]*b[i]-4*a[i]*c[i];
      
	 if (b[i]==0)
		 m=-0.00000;
	  else	 m=-(b[i]/(2*a[i]));
  	   n=sqrt(fabs(delta))/(2*a[i]);
 if (delta==0)
   {   printf("x1=x2=%.5lf\n",m);
    }
  else if(delta>0)
  {	x1=m+n;
   x2=m-n; 
	printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
  }
  else{

   printf("x1=%.5lf+%.5fi;",m,n);
   printf("x2=%.5lf-%.5fi\n",m,n);

  }
	 }
 }
 return 0;
}
int main()
{
 int n,i;
 double a,b,c,x1,x2,d;
 scanf("%d",&n);
 for(i=0;i<n;i++)
 { 
  scanf("%lf%lf%lf",&a,&b,&c); 
  if(b*b-4*a*c>0)
  {
   x1=(-b+sqrt(b*b-4*a*c))/(2*a);
   x2=(-b-sqrt(b*b-4*a*c))/(2*a);
   printf("x1=%.5lf;x2=%.5lf\n",x1,x2);
  }
  else if(b*b-4*a*c==0)
  {
   x1=(-b)/(2*a);  
   printf("x1=x2=%.5lf\n",x1);
  }
  else
  {
   d=sqrt(4*a*c-b*b)/(2*a);   
   printf("x1=-%.5lf+%.5lfi;x2=-%.5lf-%.5lfi\n",b/(2*a),d,b/(2*a),d);
  }
 }
  return 0;
}