fork download
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. class Main
  6. {
  7. public static void main (String[] args) throws java.lang.Exception
  8. {
  9. Scanner scan = new Scanner(System.in);
  10. long s = scan.nextLong();
  11. double k = Math.floor(Math.sqrt(2 * s + 1));
  12. int ans = (int) k;
  13. System.out.println (ans);
  14. }
  15. }
Success #stdin #stdout 0.07s 2184192KB
stdin
2000000000
stdout
63245