Жан-Юль-Ян Азель, 414 группа (КФ) BiquadEquation 1681
Исанбеков Дамир 414 КФ BiquadEquation 1691
n1abc = map(int, input().split(','))n1ABC = map(int, input().split(','))
2if a != 0:2if A != 0:
3    disc = b ** 2 - 4 * a * c3    discriminant = B ** 2 - 4 * A * C
4    if disc > 0:4    if discriminant > 0:
5        x1 = (-b + disc ** 0.5) / (2 * a)5        root1 = (-B + discriminant ** 0.5) / (2 * A)
6        x2 = (-b - disc ** 0.5) / (2 * a)6        root2 = (-B - discriminant ** 0.5) / (2 * A)
7        roots = []7        square_roots = []
8        if x1 > 0:8        if root1 > 0:
9            x1_1 = x1 ** 0.59            positive_sqrt1 = root1 ** 0.5
10            x1_2 = -x1 ** 0.510            negative_sqrt1 = -root1 ** 0.5
11            roots.extend([x1_1, x1_2])11            square_roots.extend([positive_sqrt1, negative_sqrt1])
12        elif x1 == 0:12        elif root1 == 0:
13            roots.append(0)13            square_roots.append(0)
14        if x2 > 0:14        if root2 > 0:
15            x2_1 = x2 ** 0.515            positive_sqrt2 = root2 ** 0.5
16            x2_2 = -x2 ** 0.516            negative_sqrt2 = -root2 ** 0.5
17            roots.extend([x2_1, x2_2])17            square_roots.extend([positive_sqrt2, negative_sqrt2])
18        elif x2 == 0:18        elif root2 == 0:
19            roots.append(0)19            square_roots.append(0)
20        if roots:20        if square_roots:
21            print(*sorted(roots))21            print(*sorted(square_roots))
22        else:22        else:
23            print('0')23            print('0')
n24    elif disc == 0:n24    elif discriminant == 0:
25        x = -b / (2 * a)25        single_root = -B / (2 * A)
26        if x > 0:26        if single_root > 0:
27            x1 = x ** 0.527            positive_single_sqrt = single_root ** 0.5
28            x2 = -x ** 0.528            negative_single_sqrt = -single_root ** 0.5
29            print(*sorted([x1, x2]))29            print(*sorted([positive_single_sqrt, negative_single_sqrt]))
30        elif x == 0:30        elif single_root == 0:
31            print(0)31            print(0)
32        else:32        else:
33            print('0')33            print('0')
34    else:34    else:
35        print('0')35        print('0')
n36elif b != 0:n36elif B != 0:
37    root = -c / b37    linear_solution = -C / B
38    if root > 0:38    if linear_solution > 0:
39        print(*sorted([root ** 0.5, -root ** 0.5]))39        print(*sorted([linear_solution ** 0.5, -linear_solution ** 0.5])
 >)
40    elif root == 0:40    elif linear_solution == 0:
41        print('0')41        print('0')
42    else:42    else:
43        print('0')43        print('0')
t44elif c == 0:t44elif C == 0:
45    print('-1')45    print('-1')
46else:46else:
47    print('0')47    print('0')
Legends
Colors
 Added 
Changed
Deleted
Links
(f)irst change
(n)ext change
(t)op