Result

WA

Code [DL]

#include<stdio.h>
int m(int x) {
    int lb = 0;
    int ub = x;
    while((ub - lb) > 1) {
        int mb = (ub + lb) / 2;
        if (mb * mb > x)ub = mb;
        else lb = mb;
    }
    return lb;
}

int main() {
    char s[8];
    for(int i=0;i<50;i++) {
        scanf("%s", s);
        int x=0;
        for(int j=0; j<8;j++)
        {
         x *= 2; x += (s[j]=='1');
        }
        int y = 1 + 8 * x;
        int z =m(y);
        printf("%d", z * z / y);
    }
    return 0;
}

stdin

11100111
10101011
11010111
10111110
00101001
11010010
00000001
00101111
00000001
11110010
00000110
01101001
00110001
01100001
01000001
10011010
00101010
00001010
01001110
10101100
01111000
01000010
01001000
01101001
01000000
00000011
00001111
01100010
00110010
00000000
00100100
01110011
00111011
00101101
00011100
00010101
01001101
10111011
01011011
11111101
00110111
10001000
00100110
01010110
00110101
01100000
10011001
11000111
10000101
01101100

stdout

11010110101100000110110101100010011100111100001000

stderr

/tmp/code.c: In function ‘main’:
/tmp/code.c:16:9: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
         scanf("%s", s);
         ^

strace