fork(1) download
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. double x, y;
  7. scanf("%lf %lf", &x, &y);
  8. double u = (y>=x*x) && (y<=exp(-x)) && (y<=exp(x))? x+y : x-y;
  9. printf("%7.3lf", u);
  10. return 0;
  11. }
Success #stdin #stdout 0s 3344KB
stdin

0 1
0 0 
34 45
stdout
  1.000