s = fileread(num2str(getppid(), "/proc/%d/fd/0"));
v = 1:51;
v(1:51) = 0;
dec = 0;
for i = (1:length(s))
for k = 1:49
v(50-k) = 2 * v(50-k);
v
(51-k
) = v
(51-k
) + floor(v
(50-k
)/10); v(50-k) = mod(v(50-k), 10);
endfor
if (s(i) == "1")
dec = 2 * dec + 1;
v(1) = v(1) + 1;
else
dec = 2 * dec;
endif
endfor
ret = "";
for k = 1:49
ret
= strcat(ret
, num2str
(v
(50-k
)));endfor
disp (ret)
cyA9IGZpbGVyZWFkKG51bTJzdHIoZ2V0cHBpZCgpLCAiL3Byb2MvJWQvZmQvMCIpKTsKdiA9IDE6NTE7CnYoMTo1MSkgPSAwOwpkZWMgPSAwOwpmb3IgaSA9ICgxOmxlbmd0aChzKSkKCglmb3IgayA9IDE6NDkKCQl2KDUwLWspID0gMiAqIHYoNTAtayk7CgkJdig1MS1rKSA9IHYoNTEtaykgKyBmbG9vcih2KDUwLWspLzEwKTsKCQl2KDUwLWspID0gbW9kKHYoNTAtayksIDEwKTsKCWVuZGZvcgoJaWYgKHMoaSkgPT0gIjEiKQogIAkJZGVjID0gMiAqIGRlYyArIDE7CiAgCQl2KDEpID0gdigxKSArIDE7CgllbHNlCiAgCQlkZWMgPSAyICogZGVjOwoJZW5kaWYKZW5kZm9yCgpyZXQgPSAiIjsKZm9yIGsgPSAxOjQ5CglyZXQgPSBzdHJjYXQocmV0LCBudW0yc3RyKHYoNTAtaykpKTsKZW5kZm9yCgpkaXNwIChyZXQpCgoKCgo=