by@__Hyoga
WA
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;elif [ $x -eq 22 ];then echo 0;fi;done;done
11111111 11100111 10100110 00101101 01111000 11010101 11010010 00010001 00100100 00010101 11010001 00001010 01011011 01001110 11111101 01101011 00110001 11011001 10101010 11101101 00111110 00110111 10101011 10111000 11000110 00000001 01110011 01010101 01000010 00010101 00000000 01111110 00000011 10100001 10111010 01101001 00011111 10111110 10010000 00000110 00001111 00111101 00010101 10001000 10011001 10011101 01011111 00011100 11001111 00000100
0 1 0 0 1 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 0 1 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1 0 1 0 1 0 0 0 1 0 0 0
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)