fork(1) download
  1. #include <iostream>
  2. #include <cmath>
  3. #include <iomanip>
  4. using namespace std;
  5.  
  6. int main() {
  7. long long x;
  8. cin >> x;
  9. long long r =(long long)sqrt(x+0.5);
  10. cout << r << " " << r*r-x << "\n";
  11. return 0;
  12. }
Success #stdin #stdout 0s 3300KB
stdin
999999999999999999
stdout
999999999 -1999999998