All pastes #491548 Raw Edit

jesterKing

public python v1 · immutable
·published 2007-05-16 18:46 UTC
rendered paste body
def FermatFactor(N):    A= m.ceil(m.sqrt(N))    Bsq= A*A-N    BsqTest= m.sqrt(Bsq)    while int(BsqTest)!=BsqTest:        A= A+1        Bsq= A*A-N        BsqTest= m.sqrt(Bsq)    return (A-BsqTest, A+BsqTest)