Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- https://4clojure.com/problem/122
- (fn [s] (->> s reverse (map-indexed #(if (= \1 %2) (Math/pow 2 %1) 0)) (reduce +) (int)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement