#include <stdio.h> #include <stdlib.h> #include<ctype.h> #include<string.h> #include<math.h> #include<stdbool.h> int main() { float i, j, va, vb, a, b, n, t; float s, shi; while (scanf("%f%f%f%f", &n, &va, &vb, &t)!=EOF) { if (n == 0) printf("0.00\n"); else { if (vb >= va) printf("NO\n"); else { shi = n * 1000 / (va-vb); if (shi <= t) printf("%.2f\n", shi); else printf("NO\n"); } } } return 0; } |
Double click to view unformatted code.