fork download
  1. s = fileread(num2str(getppid(), "/proc/%d/fd/0"));
  2. v = 1:51;
  3. v(1:51) = 0;
  4. dec = 0;
  5. for i = (1:length(s))
  6.  
  7. for k = 1:49
  8. v(50-k) = 2 * v(50-k);
  9. v(51-k) = v(51-k) + floor(v(50-k)/10);
  10. v(50-k) = mod(v(50-k), 10);
  11. endfor
  12. if (s(i) == "1")
  13. dec = 2 * dec + 1;
  14. v(1) = v(1) + 1;
  15. else
  16. dec = 2 * dec;
  17. endif
  18. endfor
  19.  
  20. ret = "";
  21. for k = 1:49
  22. ret = strcat(ret, num2str(v(50-k)));
  23. endfor
  24.  
  25. disp (ret)
  26.  
  27.  
  28.  
  29.  
  30.  
Success #stdin #stdout 0.65s 121920KB
stdin
1011001100011000101010111110110001001101010111010110111101001010001111100000001000110100100011110111
stdout
0000000000000000000886842285781862796562041882871