#include<stdio.h> #include<string.h> #include<math.h> int main(){ double n,v1,v2,t; while(scanf("%lf%lf%lf%lf",&n,&v1,&v2,&t)!=EOF){ double time; if(v1>v2){ time=1000*n/(v1-v2); if(time>t)printf("NO\n"); else printf("%.2lf\n",time); } else printf("NO\n"); } } |
Double click to view unformatted code.