Result

WA

Code [DL]

#!bin/sh
for i in `seq 1 50`;do read j;k=`echo "ibase=2; $j"|bc`;s=0;for x in `seq 0 22`;do s=$[$s+$x];if [ $s -eq $k ];then echo -n 1;break;elif [ $x -eq 22 ];then echo -n 0;fi;done;done

stdin

00001110
10001110
01110101
00000000
11100011
00100100
00010110
11010010
11101011
00011100
00110100
00110111
00101101
11000111
10111110
01110011
10001000
11100000
01101001
00001111
01100010
01010001
10001000
00000011
00110101
11111101
10101011
01000010
00111010
00001010
01111000
11110001
00000001
00000110
11101101
10111100
01010000
00010101
10011001
01000001
11101001
01001110
00100010
01101001
01011110
11100100
01100110
01011011
11111001
11100111

stdout

stderr

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/code.bash: line 2: seq: command not found

strace