Given 4 integers a,b,c and k . Find the min(non-negative Integral) value of x such that ax2+bx+c >= k.
The first line contains a single integer T i.e. the number of test cases. The first and the only line in each test case consists of four integers a,b,c and k.
Print the min value of the x so that the answer from the equation is atleast equal to k.
1 <= T <= 100
1 <= a,b,c <= 105
1 <= k <= 109
4 6 5 5
1 2 3 4
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.