I already try it.However, somehow the result is different.Just like this:
I do get "72" when entered "2351" but when I entered "1011" the answer was wrong.I supposed to get "26",but instead i get "6".I've check why it happened.This is because the 2nd and the 3rd "1" index followed the 1st "1". (1×2^1)+(0×2^2)+(1×2^1)+(1×2^1)=6.I hope you can help me.TQ