//記得import java.io.*;
int x1=0,x2=0;
BufferedReader buf=new BufferedReader(new InputStreamReader(System.in));
System.out.print("請輸入a:");
String s=buf.readLine();
int n=Integer.parseInt(s);
System.out.print("請輸入b:");
String s1=buf.readLine();
int n1=Integer.parseInt(s1);
System.out.print("請輸入c:");
String s2=buf.readLine();
int n2=Integer.parseInt(s2);
double temp=Math.sqrt((n1*n1)-(4*n*n2));
int a=(n1*n1)-(4*n*n2);
x1 = (int) ((-n1 + temp)/(2*n));
x2 = (int) ((-n1 - temp)/(2*n));
if(a>0){
System.out.println("Two different roots x1="+x1+ ", x2="+x2);
}
else if(a==0){
System.out.println("Two same roots x=" + x1);
}
else{
System.out.println("No real root");
}