by@cookies146
WA
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"); } } }
01010001 11100111 00101111 11010010 10101011 00100100 00000110 00001111 00100001 11111101 11011000 10011000 00110111 11000000 10010010 01001110 00000000 00011111 11101000 01001101 10111110 01011011 00110100 00010111 10001000 01000100 00011100 10000011 11110010 00101101 10001001 00000001 10111011 00010101 10011011 11100111 01111010 11111000 01000010 00001010 10100110 01000000 00001111 01101001 10011001 01111000 10110110 00110110 01100100 00000011
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"]