8 lines
231 B
Python
8 lines
231 B
Python
|
from __future__ import print_function
|
||
|
import sys
|
||
|
x, y = map(float, sys.stdin.readline().split())
|
||
|
n = float(sys.stdin.readline())
|
||
|
for l,u,f in ( map(float, line.split()) for line in sys.stdin ):
|
||
|
y -= (u-l)*(1-f)
|
||
|
print(x / y)
|