Result

WA

Code [DL]

for(c=java.util.Scanner(java.lang.System.in);;)print(Math.sqrt(8*c.nextInt(2)+1)%1&&1)

stdin

00010100
10010010
00100100
10011001
00011110
01110111
00111010
11111110
01001110
00001010
10001100
11000011
00011001
01100110
01110011
00001111
01111000
11111101
10101011
01101010
01001010
10001000
10001111
10111110
01000010
00010101
11100111
11010010
01001001
00011100
00011100
01011011
00000001
01010110
00100100
00000011
00111001
11101110
01100000
00011101
01011000
00000000
00000110
11110010
10110010
01101001
01011010
00110111
00101110
00101101

stdout

1
1
0
0
1
1
1
1
0
0
1
1
1
1
1
0
0
0
0
1
1
0
1
0
0
0
0
0
1
0
0
0
0
1
0
0
1
1
1
1
1
0
0
1
1
0
1
0
1
0

stderr

org.mozilla.javascript.WrappedException: Wrapped java.util.NoSuchElementException
	at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1893)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:148)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:225)
	at org.mozilla.javascript.optimizer.OptRuntime.call1(OptRuntime.java:32)
	at org.mozilla.javascript.gen._volume_CODE_1._c_script_0(Unknown Source)
	at org.mozilla.javascript.gen._volume_CODE_1.call(Unknown Source)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:393)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3282)
	at org.mozilla.javascript.gen._volume_CODE_1.call(Unknown Source)
	at org.mozilla.javascript.gen._volume_CODE_1.exec(Unknown Source)
	at org.mozilla.javascript.tools.shell.Main.processFileSecure(Main.java:601)
	at org.mozilla.javascript.tools.shell.Main.processFile(Main.java:560)
	at org.mozilla.javascript.tools.shell.Main.processSource(Main.java:531)
	at org.mozilla.javascript.tools.shell.Main.processFiles(Main.java:179)
	at org.mozilla.javascript.tools.shell.Main$IProxy.run(Main.java:100)
	at org.mozilla.javascript.Context.call(Context.java:501)
	at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:503)
	at org.mozilla.javascript.tools.shell.Main.exec(Main.java:161)
	at org.mozilla.javascript.tools.shell.Main.main(Main.java:136)
Caused by: java.util.NoSuchElementException
	at java.util.Scanner.throwFor(Scanner.java:862)
	at java.util.Scanner.next(Scanner.java:1485)
	at java.util.Scanner.nextInt(Scanner.java:2117)
	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
	... 17 more

strace