407042: GYM102697 013 Resistors in Parallel

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

013. Resistors in Paralleltime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

When two resistors with resistances a and b are parallel in an electronic circuit, their equivalent resistance is calculated as (a * b) / (a + b). Given the resistances of two resistors, calculate their equivalent resistance.

Input

The first line of input contains a single positive integer a: the resistance of the first resistor. The second line of input contains a single positive integer b: the resistance of the second resistor.

Output

Output a single positive decimal number r: the equivalent resistance of the two resistors, calculated using the above formula.

ExamplesInput
60
40
Output
24.0
Input
80
70
Output
37.333333333333336

加入题单

上一题 下一题 算法标签: