Skip to content

Commit b723614

Browse files
committed
Sum of real parts
1 parent 4f8efb2 commit b723614

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: pwned3/polymad.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
import cmath
22

3+
"""
4+
In true celebration of polynomial majesty, here are some sets of coefficients. I reckon if you find their sum of roots, there may be something for you.
5+
"""
6+
37
coeffs = [
48
[832, -112, 1],
59
[888, -119, 1],
@@ -52,4 +56,7 @@
5256

5357
print(sums)
5458

55-
# chars = ''.join([chr(sum) for sum in sums])
59+
# chars = ''.join([chr(sum.real) for sum in sums])
60+
61+
reals = [sum.real for sum in sums]
62+
print(sum(reals)) #11.42515715085705

0 commit comments

Comments
 (0)