by@moratorium08
WA
#include<stdio.h> #include<math.h> main() { char s[8]; for(int i=0;i<50;i++) { gets(s); int x=0; for(int j=0; j<8;j++) { x *= 2; x += (s[j]=='1'); } int y = 1 + 8 * x; int z =(int)sqrt(y); printf("%d", z * z / y); } }
10000011 10000010 10001000 01101011 10001011 11111101 01000010 00100000 00110011 00000110 11001110 01000110 00001111 00010100 01010011 10000000 11100111 00101101 01101001 00000000 00011100 10110011 11010010 00011111 00100110 00101000 01111011 10110111 00001111 00110111 01111000 11111000 00100100 10011001 01101111 10110101 00001010 01001110 10111110 11010110 01010010 00010101 00000011 00000010 01011011 01011011 11111100 00000001 10000001 10101011
/tmp/code.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int] main() { ^ /tmp/code.c: In function ‘main’: /tmp/code.c:6:9: warning: ‘gets’ is deprecated [-Wdeprecated-declarations] gets(s); ^ In file included from /usr/include/stdio.h:936:0, from /tmp/code.c:1: /usr/include/x86_64-linux-gnu/bits/stdio2.h:233:1: note: declared here gets (char *__str) ^ /tmp/code.c:6:9: warning: ignoring return value of ‘gets’, declared with attribute warn_unused_result [-Wunused-result] gets(s); ^ /tmp/ccZ73SB2.o: In function `main': code.c:(.text.startup+0x31): warning: the `gets' function is dangerous and should not be used. code.c:(.text.startup+0xae): undefined reference to `sqrt' collect2: error: ld returned 1 exit status /home/esolang/bin/c-gcc: line 6: /tmp/code: No such file or directory rm: cannot remove '/tmp/code': No such file or directory