Back to task

194 symbols python2
Thu Nov 3 16:58:25 2016 Sait2000
from fractions import*
p,q,r=map(int,raw_input().split())
z=int((q*q-4*p*r)**.5)
b,c,e=2*p,q+z,q-z
g,h=gcd(c,b),gcd(e,b)
b,c,d,e=b/g,c/g,b/h,e/h
if(d,e)>(b,c):b,c,d,e=d,e,b,c
print p/b/d,b,c,d,e


Leave a comment

Parsed as Markdown

Login to leave a comment