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