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

10001000
00101101
11110001
11101000
00100011
01001110
01111001
10100100
00010111
01101001
00000000
01111011
01001110
00101101
01111000
10011000
00100101
00011010
01011010
00011101
00001010
11010001
10010100
10101101
01011110
00010101
00110111
00101100
11101100
01011011
00001111
11111000
10111110
01110101
00000011
11010010
00000001
11100111
11101101
01110001
00111010
01000010
01000000
00000110
00011100
10100111
11111101
10101011
00100100
10011001

stdout

11000100010011100000100001100110101111000101101111

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