fork download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main() {
  6. ios_base::sync_with_stdio(false);
  7. cin.tie(NULL);
  8.  
  9. double v, d, s;
  10. char w;
  11.  
  12. if (cin >> v >> d >> s >> w) {
  13. if (w == 'W') {
  14. v *= 0.64;
  15. } else if (w == 'F') {
  16. d *= 0.82;
  17. }
  18.  
  19. double thoigian = d / v;
  20.  
  21. if (thoigian <= s + 1e-9) {
  22. cout << "NAM ANH DA BI HA GUc\n";
  23. } else {
  24. cout << "NAM ANH CHUA BI Ha GUC\n";
  25. }
  26. }
  27.  
  28. return 0;
  29. }
Success #stdin #stdout 0s 5332KB
stdin
Standard input is empty
stdout
Standard output is empty