fork download
  1. (de f (x b s)
  2. (if (= x 0) s (f (/ x 10) (* 2 b) (+ (* b (% x 10)) s))))
  3.  
  4. (de main ()
  5. (let (n (read))
  6. (prinl (f n 1 0))
  7. )
  8. )
  9.  
  10. (in NIL (main))
  11.  
Success #stdin #stdout 0s 3768KB
stdin
1101101011110110111010010111110111100010100100000100010100100111100110011001110010110100101111001110
stdout
1084259688419801060569760091086