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