by@moratorium08
WA
#include<stdio.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); } }
00110111 00010101 01100001 01001110 01111000 01000010 00101101 00001000 00010001 11100110 01011011 10100011 00101101 01100010 00000011 00000001 01011001 01001010 01101001 10101011 00110010 11010010 00001010 10001000 00000110 11011010 10010110 11100111 10001110 11100010 00101000 00111011 10010101 01111011 10011001 00000010 10111110 11111101 01001111 00011100 11001011 00100100 00001111 11111000 11101110 00001010 00000000 10000110 10000011 00100101
/tmp/code.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int] main() { ^ /tmp/code.c: In function ‘main’: /tmp/code.c:5: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:12:21: warning: implicit declaration of function ‘sqrt’ [-Wimplicit-function-declaration] int z =(int)sqrt(y); ^ /tmp/code.c:12:21: warning: incompatible implicit declaration of built-in function ‘sqrt’ /tmp/code.c:12:21: note: include ‘<math.h>’ or provide a declaration of ‘sqrt’ /tmp/code.c:5:9: warning: ignoring return value of ‘gets’, declared with attribute warn_unused_result [-Wunused-result] gets(s); ^ /tmp/ccKlCfrV.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