fork(1) download
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main() {
  6. int n;
  7. cin >> n;
  8. cout << round(sqrt(2 * n));
  9. return 0;
  10. }
Success #stdin #stdout 0s 4548KB
stdin
120
stdout
15