// yuki 955 ax^2+bx+c=0 // 2019.12.18 bal4u #include #include #include #include typedef long long ll; int getchar_unlocked(void); #define gc() getchar_unlocked() int in() { // 整数の入力 int n = 0; int c; do c = gc(); while (isspace(c)); if (c == '-') { c = gc(); do n = 10*n + (c & 0xf), c = gc(); while (c >= '0'); return -n; } do n = 10*n + (c & 0xf), c = gc(); while (c >= '0'); return n; } void pr(int n, double x1, double x2) { printf("%d\n", n); if (n == 1) printf("%.16lf\n", x1); else if (n == 2) { if (x1 <= x2) printf("%.16lf\n%.16lf\n", x1, x2); else printf("%.16lf\n%.16lf\n", x2, x1); } exit(0); } int main() { int a, b, c; a = in(), b = in(), c = in(); if (a == 0) { if (b == 0 && c == 0) pr(-1, 0, 0); else if (b == 0) pr(0, 0, 0); else pr(1, -(double)c/b, 0); } else if (c == 0) { if (b == 0) pr(1, 0, 0); else pr(2, 0, -(double)b/a); } else { ll d = (ll)b*b - 4*(ll)a*c; if (d < 0) pr(0, 0, 0); else if (d == 0) pr(1, -(double)b/(2*a), 0); else { double x, t = sqrt((double)d); if (b >= 0) x = (-b-t)/(2*a); else x = (-b+t)/(2*a); pr(2, x, (double)c/a/x); } } return 0; }