/42A.py
https://bitbucket.org/alculquicondor/codeforces · Python · 12 lines · 12 code · 0 blank · 0 comment · 4 complexity · 11417c3f1bf7513b8799dc19e33af99e MD5 · raw file
- s=raw_input().split()
- n=int(s[0])
- V=float(s[1])
- A=[int(x) for x in raw_input().split()]
- B=[int(x) for x in raw_input().split()]
- x=1e300
- for i in range(n):
- x=min(float(B[i])/A[i],x)
- r=0
- for i in range(n):
- r+=A[i]*x
- print min(r,V)