Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

JavaScript (ES6), 96 bytes (DIOCL)

`${x="DDDD6IIIII6OOO7CCCC5L"} ${y=`D3D7I7O3O5C9L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)) 

The idea here is to not only make the middle three lines identical, but also make the first line nearly identical to the last. Since there are only 4 letters that perfectly fit this description CDIO, L is the next best option, as it only requires 4 added characters at the end of the string.

As with Florent's answerFlorent's answer, this is a snippet that returns the result. Add 3 bytes if it needs to be a function.

Test snippet

console.log(`${x="DDDD6IIIII6OOO7CCCC5L"} ${y=`D3D7I7O3O5C9L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)))

JavaScript (ES6), 96 bytes (DIOCL)

`${x="DDDD6IIIII6OOO7CCCC5L"} ${y=`D3D7I7O3O5C9L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)) 

The idea here is to not only make the middle three lines identical, but also make the first line nearly identical to the last. Since there are only 4 letters that perfectly fit this description CDIO, L is the next best option, as it only requires 4 added characters at the end of the string.

As with Florent's answer, this is a snippet that returns the result. Add 3 bytes if it needs to be a function.

Test snippet

console.log(`${x="DDDD6IIIII6OOO7CCCC5L"} ${y=`D3D7I7O3O5C9L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)))

JavaScript (ES6), 96 bytes (DIOCL)

`${x="DDDD6IIIII6OOO7CCCC5L"} ${y=`D3D7I7O3O5C9L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)) 

The idea here is to not only make the middle three lines identical, but also make the first line nearly identical to the last. Since there are only 4 letters that perfectly fit this description CDIO, L is the next best option, as it only requires 4 added characters at the end of the string.

As with Florent's answer, this is a snippet that returns the result. Add 3 bytes if it needs to be a function.

Test snippet

console.log(`${x="DDDD6IIIII6OOO7CCCC5L"} ${y=`D3D7I7O3O5C9L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)))

golfed 1 byte
Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

JavaScript (ES6), 9796 bytes (CDIOLDIOCL)

`${x=" CCCC5DDDD6IIIII6OOO6L"x="DDDD6IIIII6OOO7CCCC5L"} ${y=`C9D3D7I7O3O5Ly=`D3D7I7O3O5C9L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)) 

The idea here is to not only make the middle three lines identical, but also make the first line nearly identical to the last. Since there are only 4 letters that perfectly fit this description CDIO, L is the next best option, as it only requires 4 added characters at the end of the string.

As with Florent's answer, this is a snippet that returns the result. Add 3 bytes if it needs to be a function.

Test snippet

console.log(`${x=" CCCC5DDDD6IIIII6OOO6L"x="DDDD6IIIII6OOO7CCCC5L"} ${y=`C9D3D7I7O3O5Ly=`D3D7I7O3O5C9L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)))

JavaScript (ES6), 97 bytes (CDIOL)

`${x=" CCCC5DDDD6IIIII6OOO6L"} ${y=`C9D3D7I7O3O5L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)) 

The idea here is to not only make the middle three lines identical, but also make the first line nearly identical to the last. Since there are only 4 letters that perfectly fit this description CDIO, L is the next best option, as it only requires 4 added characters at the end of the string.

As with Florent's answer, this is a snippet that returns the result. Add 3 bytes if it needs to be a function.

Test snippet

console.log(`${x=" CCCC5DDDD6IIIII6OOO6L"} ${y=`C9D3D7I7O3O5L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)))

JavaScript (ES6), 96 bytes (DIOCL)

`${x="DDDD6IIIII6OOO7CCCC5L"} ${y=`D3D7I7O3O5C9L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)) 

The idea here is to not only make the middle three lines identical, but also make the first line nearly identical to the last. Since there are only 4 letters that perfectly fit this description CDIO, L is the next best option, as it only requires 4 added characters at the end of the string.

As with Florent's answer, this is a snippet that returns the result. Add 3 bytes if it needs to be a function.

Test snippet

console.log(`${x="DDDD6IIIII6OOO7CCCC5L"} ${y=`D3D7I7O3O5C9L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)))

Source Link
ETHproductions
  • 50.3k
  • 6
  • 96
  • 241

JavaScript (ES6), 97 bytes (CDIOL)

`${x=" CCCC5DDDD6IIIII6OOO6L"} ${y=`C9D3D7I7O3O5L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)) 

The idea here is to not only make the middle three lines identical, but also make the first line nearly identical to the last. Since there are only 4 letters that perfectly fit this description CDIO, L is the next best option, as it only requires 4 added characters at the end of the string.

As with Florent's answer, this is a snippet that returns the result. Add 3 bytes if it needs to be a function.

Test snippet

console.log(`${x=" CCCC5DDDD6IIIII6OOO6L"} ${y=`C9D3D7I7O3O5L `,y+y+y+x}LLLL`.replace(/\d/g,d=>" ".repeat(d)))