Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- from gmpy2 import mpz, isqrt_rem, isqrt, t_div
- c = mpz(1522605027922533360535618378132637429718068114961380688657908494580122963258952897654000350692006139)
- n = mpz(14387588531011964456730684619177102985211280936)
- #c = mpz(145)
- #n = mpz(5)
- d, e = isqrt_rem(c)
- f = abs(e - ((2 * d) + 1))
- x = isqrt(((d + n) ** 2) - c) - n
- a = d - x
- b = t_div(c, a)
- print("c {}\nn {}\n\nd {}\ne {}\nf {}\nx {}\n\na {}\nb {}".format(c, n, d, e, f, x, a, b))
Add Comment
Please, Sign In to add comment