fork(2) download
  1. #include <iostream>
  2. #include <math.h>
  3. #include <iomanip>
  4.  
  5.  
  6. using namespace std;
  7.  
  8. int main()
  9. {
  10. long double a,b,c,x;
  11. cin>>a>>b>>c;
  12. if (a==0 && b!=c) cout<<"BR"<<endl;
  13. else if( a==0 && b==c) cout<<"NWR"<<endl;
  14. else
  15. {
  16. x=(c-b)/a;
  17. cout << setprecision(2) <<x<< endl;
  18.  
  19. }
  20.  
  21.  
  22. return 0;
  23. }
  24.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
-nan