Problem:


Score : 100 points

Problem Statement

In an electric circuit, when two resistors R_1 and R_2 are connected in parallel, the equivalent resistance R_3 can be derived from the following formula:

\frac{1}{R_1} + \frac{1}{R_2} = \frac{1}{R_3}

Given R_1 and R_2, find R_3.

Constraints

1 \leq R_1, R_2 \leq 100

R_1 and R_2 are integers.

Input

The input is given from Standard Input in the following format:

R_1 R_2

Output

Print the value of R_3.

The output is considered correct if the absolute or relative error is at most 10^{-6}.

Sample Input 1

2 3

Sample Output 1

1.2000000000

Sample Input 2

100 99

Sample Output 2

49.7487437186



Sample input:
2 3


Sample output:
1.2000000000

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
print(1/a + 1/b)

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
print(1/a+1/b)

Submission status: Wrong Answer

Solution code:
s = input()
rs = ''.join(['d' if(c=='b') else 'b' if(c=='d') else 'q' if(c=='p') else 'p' for c in s[::-1]])
ans = 'Yes' if(s == rs) else 'No'
print(ans)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
ans = 1 / ((1 / a) + (1 / b))
print(ans)

Submission status: Accepted

Solution code:
a,b= map(int, input().split())
print(1/(1/a + 1/b))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(1/(1/a+1/b))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
print(1/(1/a+1/b))

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())
r3 = (r1 * r2) / (r1 + r2)
print(r3)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print(a*b/(a+b))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
# (R1)+(R2)/(R1*R2) = 1/(R3)
# (R1)+(R2)*(R3) = (R1*R2)
# (R3) = (R1*R2)/(R1)+(R2)
S = a+b
print(float((a*b)/S))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def list4d(a, b, c, d, e): return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(N=None): return list(MAP()) if N is None else [INT() for i in range(N)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = 10 ** 18
MOD = 10 ** 9 + 7

R1, R2 = MAP()

ans = 1 / (1/R1 + 1/R2)
print(ans)

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())
print((r1*r2) / (r1 + r2))

Submission status: Accepted

Solution code:
def main():
    R1, R2 = map(int, input().split())
    ans = R1 * R2 / (R1 + R2)
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
R1,R2=map(int,input().split())
print((R1*R2)/(R1+R2))

Submission status: Accepted

Solution code:
r1,r2=map(int,input().split())
print(r1*r2/(r1+r2))

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())
print((r1 * r2) / (r1 + r2))

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())
print(r1*r2 / (r1+r2))

Submission status: Accepted

Solution code:
A,B=map(int,input().split())
print((A*B)/(A+B))

Submission status: Accepted

Solution code:
def main():
    n, m = map(int, input().split())
    print(1/(1/n+1/m))


main()

Submission status: Accepted

Solution code:
a,b=map(int,input().split());print(a*b/(a+b))

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())
ans = (r1 * r2) / (r1 + r2)
print(ans)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print((a**-1+b**-1)**-1)

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())

print(1 / ((1 / r1) + (1 / r2)))

Submission status: Accepted

Solution code:
n,m=map(float,input().split())
print(n*m/(n+m))

Submission status: Accepted

Solution code:
#ライブラリインポート
from collections import defaultdict

#入力受け取り
def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	R1, R2 = getlist()
	ans = R1 * R2 / (R1 + R2)
	print(ans)

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
def main():
    r1, r2 = map(int, input().split())
    return r1 * r2 / (r1 + r2)

if __name__ == '__main__':
    print(main())

Submission status: Accepted

Solution code:
r1, r2 = [int(item) for item in input().split()]
print((r1 * r2) / (r1 + r2))

Submission status: Accepted

Solution code:
R1, R2 = map(int, input().split())
print(R1*R2/(R1+R2))

Submission status: Accepted

Solution code:
R1, R2 = [int(i) for i in input().split()]

R3 = 1 / (1 / R1 + 1 / R2)
print("{:.9f}".format(R3))

Submission status: Accepted

Solution code:
R1,R2 = map(int,input().split())
R = 1/(1/R1 + 1/R2)
print(R)

Submission status: Accepted

Solution code:
r1, r2 = [ int(v) for v in input().split() ]

print(r1*r2/(r1+r2))

Submission status: Accepted

Solution code:
r1, r2 = list(map(int, input().split()))
print(r1 * r2 / (r1 + r2))

Submission status: Accepted

Solution code:
n,m = map(int,input().split())

print((n*m)/(n+m))

Submission status: Accepted

Solution code:
a=list(map(int,input().split()))
print(1/(1/a[0]+1/a[1]))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


def main():
    r1, r2 = map(int, input().split())
    print(r1 * r2 / (r1 + r2))


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())
print(1/(1/r1+1/r2))

Submission status: Accepted

Solution code:
R1, R2 = map(int, input().split())

print(1 / (1/R1 + 1/R2))

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())
print('%.6f' % (1 / (1 / r1 + 1 / r2)))

Submission status: Accepted

Solution code:
r1,r2 = map(int,input().split())
a = r1*r2
b = r1 + r2
r3 = a/b
print(r3)

Submission status: Accepted

Solution code:
from collections import deque
R1, R2 = map(int, raw_input().split())
R3_inv = 1./R1+1./R2
print 1./R3_inv

Submission status: Accepted

Solution code:
import sys

r1, r2 = list(map(int, sys.stdin.readline().strip().split(" ")))

R = 1/r1 + 1/r2

print(1/R)

Submission status: Accepted

Solution code:
x,y = map(int,input().split())
print(x*y/(x+y))

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print((a * b) / (a + b))

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())
r3 = (r1 * r2) / (r1 + r2)
print(str(r3))

Submission status: Accepted

Solution code:
print(eval('1/'+input().replace(' ','+1/'))**-1)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print(1/(1/a+1/b))

Submission status: Accepted

Solution code:
def solve(r1, r2):
    return float(r1*r2) / (r1+r2)
assert abs(solve(2, 3) - 1.2000000000) < 1e-6
assert abs(solve(100, 99) - 49.7487437186) < 1e-6
r1, r2 = map(int, raw_input().split())
print solve(r1, r2)

Submission status: Accepted

Solution code:
a,b = (int(i) for i in input().split())
print(a*b*1.0/(a+b))

Submission status: Accepted

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**15
mod = 10**9+7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


def main():
    a,b = LI()

    return 1 / (1 / a + 1 / b)




print(main())

Submission status: Accepted

Solution code:
import math
import sys

def getinputdata():

    # 配列初期化
    array_result = []
    
    data = input()
    
    array_result.append(data.split(" "))

    flg = 1

    try:
        while flg:

            data = input()

            array_temp = []

            if(data != ""):
                
                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:


        return array_result

arr_data = getinputdata()

r1 = int(arr_data[0][0])
r2 = int(arr_data[0][1])


print(1/((r2+r1) /(r1*r2)))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print((a*b)/(a+b))

Submission status: Accepted

Solution code:
R1,R2 = map(int,input().split())
print(R1*R2 / (R1+R2))

Submission status: Accepted

Solution code:
R1,R2 = map(int,input().split())
print(R1*R2 / (R1+R2))

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
r1,r2 = map(int, input().split())
print((r1*r2)/(r1+r2))

Submission status: Accepted

Solution code:
r,t = map(int,input().split())
print(1/(1/r+1/t))

Submission status: Accepted

Solution code:
r1,r2 = map(int,input().split())
print(r1*r2/(r1+r2))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
print('{:0.10f}'.format((a*b)/(a+b)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

r_1, r_2 = map(int, input().split())

r_3 = r_1 * r_2 /(r_1 + r_2)

print(r_3)

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
print((a * b / (a + b)))

Submission status: Accepted

Solution code:
a,b=map(float,raw_input().split())
print a*b/(a+b)

Submission status: Accepted

Solution code:
r1,r2=map(float,input().split())
r3 = r1*r2/(r1+r2)
print(r3)

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print((A * B) / (A + B))

Submission status: Accepted

Solution code:
from sys import stdin
x,y = map(int,stdin.readline().split())
print (x*y)/((x+y)*1.0)

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())
r3 = (r1 * r2) / (r1 + r2)
print(str(r3))

Submission status: Accepted

Solution code:
r1, r2 = map(int, input().split())
print(1/(1/r1 + 1/r2))

Submission status: Accepted

Solution code:
R1, R2 = map(int, raw_input().split())
R3 = 1.0 * R1 * R2 / (R1+R2)
print '%.10f'%R3

Submission status: Accepted

Solution code:
from fractions import *
r1,r2=map(int,input().split())
R1=Fraction(1,r1)
R2=Fraction(1,r2)
R3=R1+R2
print(R3.denominator/R3.numerator)

Submission status: Accepted

Solution code:
a,b=map(int, raw_input().split())
print '%.7f'%(a*b*1.0/(a+b))

Submission status: Accepted

Solution code:
r1,r2 = map(int, raw_input().split())
print (1.0/(1.0/r1+1.0/r2))

Submission status: Runtime Error

Solution code:
a,b=map(int,input())
print((a**-1+b**-1)**-1)

Submission status: Runtime Error

Solution code:
n,m = map(input().split())

print((n*m)/(n+m))

Submission status: Runtime Error

Solution code:
print(1/(1/int(input())+1/int(input())))

Submission status: Runtime Error

Solution code:
r1 = (int)(input())
r2 = (int)(input())
print(r1*r2/(r1+r2))

Submission status: Runtime Error

Solution code:
a, b, c = map(int, input().split())
print((a * b / (a + b)))