fork download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. double b;
  7. int x, y;
  8.  
  9. cin >> x >> y;
  10.  
  11. if (x/y > 0) {
  12.  
  13. b = log(x*x) + pow(abs(x*x),1/3);
  14.  
  15. } else if (x/y < 0) {
  16.  
  17. b = log((x*x)/y) * pow((x+y),3);
  18.  
  19. } else {
  20.  
  21. b = pow((pow((x*x),2) + y),3);
  22.  
  23. }
  24.  
  25. cout << b;
  26.  
  27. return 0;
  28. }
Success #stdin #stdout 0s 15232KB
stdin
-8
4
stdout
-177.446