Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cnt = 0
- for i in range(-5000,5000):
- a = i
- aa = (a*a + a + 1);
- bb = (9*a + 2);
- cc = (5*a - 7);
- x1 = (-bb - (bb * bb - 4 * aa * cc)**0.5)/(2 * aa)
- x2 = (-bb + (bb * bb - 4 * aa * cc)**0.5)/(2 * aa)
- if ((abs(x1) > 1) and (abs(x2) < 1)):
- cnt +=1
- print(cnt)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement