#P1249. Special Week With Dance Power
Special Week With Dance Power
题目描述
In the recent dance class, Teio has taught Special Week one formula to calculate the dance power :
$$d(x)=\int_0^x \frac{dt}{t^2+(a+b)t+ab}+\frac{lnb-lna}{a-b}$$
$$D(x)=\sum \limits_{i=1}^x ad(x)-bd(x)$$
As poor as Special Week's math is, for three given positive integer please help her calculate
输入格式
The first line contains one positive integer indicating the number of the queries.
Then followed lines, each line contains three positive integers .
输出格式
For each query, output one number, the answer .
Your answer will be considered correct, if its absolute or relative error isn't greater than . Formally, let your answer be , while jury's answer be . Your answer will be considered correct if holds.
样例
3
1 2 3
9 8 7
2021 4 9
0.6694306539
-0.4517696480
-45.4575754312