Skip to main content
added 44 characters in body
Source Link
G B
  • 22.8k
  • 1
  • 20
  • 53

Ruby, 92 5150 bytes, score 88 7

->e{'$><<(""<<'+'$><<$==""<<'+(e.bytes.map{|x|[1]*x*?+}*"<<")+?)}

Try it online!Try it online!

How

In Ruby, the string operator << converts an integer to a codepoint, and appends the corresponding character.

Starting with the empty string, we can append all characters of the original string as numbers, and send the result to standard output ($>).

  Using puts$= works without(deprecated variable warning) to avoid wrapping the string in brackets, but the score is the sameand saves 1 character.

Ruby, 92 51 bytes, score 8

->e{'$><<(""<<'+(e.bytes.map{|x|[1]*x*?+}*"<<")+?)}

Try it online!

How

In Ruby, the string operator << converts an integer to a codepoint, and appends the corresponding character.

Starting with the empty string, we can append all characters of the original string as numbers, and send the result to standard output ($>).

  Using puts works without brackets, but the score is the same.

Ruby, 92 50 bytes, score 8 7

->e{'$><<$==""<<'+(e.bytes.map{|x|[1]*x*?+}*"<<")}

Try it online!

How

In Ruby, the string operator << converts an integer to a codepoint, and appends the corresponding character.

Starting with the empty string, we can append all characters of the original string as numbers, and send the result to standard output ($>). Using $= (deprecated variable warning) to avoid wrapping the string in brackets, and saves 1 character.

added 340 characters in body
Source Link
G B
  • 22.8k
  • 1
  • 20
  • 53

Ruby, 9292 51 bytes, score 8

->e{'$><<(""<<'+(e.bytes.map{|x|([111]*(x/111)+[11]*(x%111/11)+[1]*(x%111%11))*|x|[1]*x*?+}*"<<")+?)}

Try it online!Try it online!

How

In Ruby, the string operator << converts an integer to a codepoint, and appends the corresponding character.

Starting with the empty string, we can append all characters of the original string as numbers, and send the result to standard output ($>).

Using puts works without brackets, but the score is the same.

Ruby, 92 bytes, score 8

->e{'$><<(""<<'+(e.bytes.map{|x|([111]*(x/111)+[11]*(x%111/11)+[1]*(x%111%11))*?+}*"<<")+?)}

Try it online!

Ruby, 92 51 bytes, score 8

->e{'$><<(""<<'+(e.bytes.map{|x|[1]*x*?+}*"<<")+?)}

Try it online!

How

In Ruby, the string operator << converts an integer to a codepoint, and appends the corresponding character.

Starting with the empty string, we can append all characters of the original string as numbers, and send the result to standard output ($>).

Using puts works without brackets, but the score is the same.

Source Link
G B
  • 22.8k
  • 1
  • 20
  • 53

Ruby, 92 bytes, score 8

->e{'$><<(""<<'+(e.bytes.map{|x|([111]*(x/111)+[11]*(x%111/11)+[1]*(x%111%11))*?+}*"<<")+?)}

Try it online!