Result

WA

Code [DL]

for(;q=new java.util.Scanner(java.lang.System.in).nextLine();print(+!(Math.sqrt(parseInt(q,2)*8+1)%1)));

stdin

00010101
00001111
01101001
00100000
01110111
00001010
00101010
01111100
00010101
00100100
10000101
10110100
10100010
00110100
01010001
00000000
11001111
10001000
01000010
11001011
00101110
01000100
01111000
11110110
00000001
00101101
01111010
10111110
10101011
10011001
11010010
00011010
01001110
01001011
00011101
11110011
00000011
10011101
00000110
10110010
01011100
11100111
01101000
00011100
10101011
00001100
01010111
00110111
11111101
01011011

stdout

1

stderr

org.mozilla.javascript.WrappedException: Wrapped java.util.NoSuchElementException: No line found
	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.callProp0(OptRuntime.java:85)
	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: No line found
	at java.util.Scanner.nextLine(Scanner.java:1540)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	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