You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

C.py 231B

1234567
  1. from __future__ import print_function
  2. import sys
  3. x, y = map(float, sys.stdin.readline().split())
  4. n = float(sys.stdin.readline())
  5. for l,u,f in ( map(float, line.split()) for line in sys.stdin ):
  6. y -= (u-l)*(1-f)
  7. print(x / y)