fork download
  1. s = fileread(num2str(getppid(), "/proc/%d/fd/0"));
  2.  
  3. dec = 0;
  4.  
  5. for i = (1:length(s))
  6. if (s(i) == "1")
  7. dec = 2 * dec + 1;
  8. else
  9. dec = 2 * dec;
  10. endif
  11.  
  12. endfor
  13.  
  14. disp (num2str(dec))
Success #stdin #stdout 0.32s 121920KB
stdin
1101001111101011000101101110010010010011110011111000010011010011001000000001010001011001010001111000
stdout
1049368683975750266819201466368