Girls and Security Patrol
All submissions for this problem are available.
Isha and Suhana are on security patrol.
They start from a checkpoint and go in opposite direction for greater coverage.
Isha starts with speed U metre/second and Suhana starts with speed V metre/second.
They both have a walkie-talkie, operating for maximum distance of X metres. How long will they be able to communicate ?
First line contains number of test cases.
Each test contains three integers U, V and X on a new line.
For each test case output the required answer in seconds on the new line.
Your answer will be considered correct if it has an absolute error less than 1e-6.
- 1 ≤ T ≤ 1000
- 1 ≤ U, V ≤ 2 * 10^9
- 1 ≤ X ≤ 2000
Input: 3 3 3 3 6 2 4 38 47 847 Output: 0.5000000000 0.5000000000 9.9647058824
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, SCM chicken, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.