Skip to main content
added 487 characters in body
Source Link

Ruby, 2120 bytes

->(b){"*"*b?**b.to_i(2)} 

Try it online!Try it online!


 

It goes from binary to a decimal integer, and becomes a factor by which an asterisk stringchar is multiplied.

(Idea to switch to char from string was suggested by Travis. Thanks!)


Ruby, 21 bytes | (old)

->(b){"*"*b.to_i(2)} 

Try it online!

Same as the upper one, but the upper one has been improved.

Ruby, 21 bytes

->(b){"*"*b.to_i(2)} 

Try it online!


 

It goes from binary to a decimal integer, and becomes a factor by which an asterisk string is multiplied.

Ruby, 20 bytes

->(b){?**b.to_i(2)} 

Try it online!

It goes from binary to a decimal integer, and becomes a factor by which an asterisk char is multiplied.

(Idea to switch to char from string was suggested by Travis. Thanks!)


Ruby, 21 bytes | (old)

->(b){"*"*b.to_i(2)} 

Try it online!

Same as the upper one, but the upper one has been improved.

Source Link

Ruby, 21 bytes

->(b){"*"*b.to_i(2)} 

Try it online!


It goes from binary to a decimal integer, and becomes a factor by which an asterisk string is multiplied.