Result

AC

Code [DL]

f={x->if(x>0)f(int(x/10))*2+x%2else 0}
stdin|{x->if(sqrt(f(number(x))*8+1)%1>0)0else 1}|puts

stdin

10101011
01111010
11110101
00101101
00000011
01101001
01001110
00001010
00110011
10101010
00110111
11111101
11010010
01111011
00010101
11100000
01100101
01100011
11001011
00001111
00000110
11101110
00011100
01000010
00100110
11100111
01011011
10111110
00100100
01000010
00000000
10000111
10111111
00011110
00010111
11100011
00110101
10001000
10011001
10110101
00100011
11011101
00100100
01111110
00000001
01111000
00100010
11101011
11101100
11111100

stdout

1
0
0
1
1
1
1
1
0
0
1
1
1
0
1
0
0
0
0
1
1
0
1
1
0
1
1
1
1
1
1
0
0
0
0
0
0
1
1
0
0
0
1
0
1
1
0
0
0
0

stderr

strace