Result

AC

Code [DL]

for i in {0..49};do read j;k=0;y=1;for x in {0..7};do if [ ${j:$[7-$x]:1} = 1 ];then k=$[$k+$y];fi;y=$[2 * $y];done;s=0;for x in {0..22};do s=$[$s+$x];if [ $s -eq $k ];then echo 1;break;elif [ $x -eq 22 ];then echo 0;fi;done;done

stdin

01110010
10011001
00100100
00110011
10110011
11000110
10001000
01001011
01111001
00000110
00000011
00101101
01110101
11001100
11111101
00001111
01001110
01010000
01000010
01011000
10111110
11000111
01111000
10101011
01000110
00000000
01101001
01001101
11110010
11100011
00110111
00011100
00010101
00111001
00000110
10001001
01110100
10101001
11110000
11011110
11100010
01100100
00001010
01001110
11100111
00010111
11010010
01010011
01011011
00000001

stdout

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

stderr

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)

strace