by@moratorium08
WA
#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[9]; 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; }
01011011 01001001 11010000 01010011 00101001 00001111 11100111 00011101 10110101 01110010 10101011 11011010 01111011 11110000 00110111 10010010 01101001 10111110 01111000 10001000 01001110 00100100 10011100 10101011 00110001 11111111 00000001 00010010 11010010 11111101 00001010 01010100 00000011 00111101 10011111 01000010 00110010 10010101 00000000 00010101 11000000 00101101 01110100 00011100 00000110 10001111 00101111 01101001 10011001 10011110
10000110001000101111110100101110100100010101100110
/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); ^