Result

WA

Code [DL]

import std.stdio;
import std.array;
import std.math;
import std.conv;

bool issq(int a) {
    return cast(int)sqrt(cast(real)a)*cast(int)sqrt(cast(real)a) == a;
}

bool tri(int a) {
    return issq(8*a+1) && (cast(int)sqrt(8.0*a+1) % 2);
}
void main() {
    string s;
    while ((s = readln()).length > 3) {
        int i = to!int(split(s)[0],2);
        if(tri(i)) {
            writeln("1");
        } else {
            writeln("0");
        }
    }
}

stdin

00101100
10010111
10011001
11001100
00010101
01111000
00100100
00011111
11111101
11100111
00000110
00101010
01001100
01001010
00001101
11100111
01011011
00100001
00110111
00011100
10000001
00011101
00000011
11001101
01000010
00000001
00001100
00000000
01001011
00001011
01101001
00101101
01001001
10101011
10111110
01110000
10001000
00010110
01001110
10100000
00001111
00111111
00001010
00001110
10011011
10001011
00100100
10101100
11010010
01100000

stdout

stderr

Error: module CODE is in file '/volume/CODE.d' which cannot be read
import path[0] = /volume
import path[1] = /usr/include/dmd/phobos
import path[2] = /usr/include/dmd/druntime/import
Failed: ["dmd", "-v", "-o-", "/volume/CODE.d", "-I/volume"]

strace