Result

AC

Code [DL]

use POSIX qw(floor);
while(defined($l=<STDIN>)){
    $x=1+8*unpack("C",pack("B8",$l));
    $y=int((sqrt($x)));
    print int($y*$y/$x);
}

stdin

10110111
10111110
11111111
00000111
00000011
10001101
11111101
11111101
00110000
00010101
01100110
10001110
10010100
00010000
10101011
11111000
10000001
00101101
11100111
00000110
00000001
11110000
01001001
00110111
01111000
00001010
01010011
10101010
11010010
11000110
01001110
00001100
11011110
01000010
10001001
10010111
01101001
00000000
00001111
10011001
10100000
11000010
11101110
01111010
01011011
00100100
00011100
00011110
00101101
10001000

stdout

01001011010000100111100111001010010011110000111011

stderr

strace