Back to task

195 symbols python2
Sun Feb 22 12:54:17 2015 Sait2000
from fractions import*
p,q,r=map(int,raw_input().split())
z=int((q*q-4*p*r)**0.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