fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. /* The class name doesn't have to be Main, as long as the class is not public. */
  4. class Main
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. for (int index = 0; index < 20; ++index)
  9. {
  10. int i = (int)Math.round( Math.sqrt(8*index + 9));
  11. if (i*i == 8*index+9)
  12. System.out.print(1);
  13. else
  14. System.out.print(0);
  15.  
  16. }
  17. }
  18. }
Success #stdin #stdout 0.07s 380160KB
stdin
Standard input is empty
stdout
10100100010000100000