Factorization corrected by hallvabo

class F{static{for(java.util.Scanner s=new java.util.Scanner(System.in);s==s;){int a=s.nextInt(),x=(a+(int)Math.sqrt(a*a-4*s.nextInt()))/2;System.out.println(a-x+" "+x);}}}

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page