p , q and r have rs . 7000 among themselves . r has two - thirds of the total amount with p and q . find the amount with r ?
n0 = 7000.0
t0 = 2.0 / 3.0
t1 = t0 + 1.0
t2 = n0 / t1
answer = t2 * t0
print(answer)