#include<bits/stdc++.h> using namespace std; int main(){ double n,v1,v2,s; while(scanf("%lf%lf%lf%lf",&n,&v1,&v2,&s)!=EOF){ if(v2>=v1)cout<<"NO"<<endl; else{ double time = n*1000/(v1-v2); if(time > s)cout<<"NO"<<endl; else{ printf("%.2lf\n",time); } } } return 0; } |
Double click to view unformatted code.