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