fork(1) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. double a;
  7. cin >> a;
  8. cout << (a <= 0 ? 0 : a <= 1 ? a * a - 1 : a * a - sin(M_PI * a * a)) << endl;
  9. return 0;
  10. }
Success #stdin #stdout 0s 3464KB
stdin
456
stdout
207936