Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Revisions

3 of 3
Commonmark migration

Octave, 34

Managed to get it down to 62 bytes. A Levenshtein distance of 3 takes the score up to 34.

disp({'Hi, Hello!',["+-+\n| |\n+-+"],5:2:25,'Hello, bye!'}{1})

Using double quoted strings, we can use the newline character \n instead of the ASCII value 10.

Tests:

disp({'Hi, Hello!',["+-+\n| |\n+-+"],5:2:25,'Hello, bye!'}{1})
Hi, Hello!
disp({'Hi, Hello!',["+-+\n| |\n+-+"],5:2:25,'Hello, bye!'}{2})
+-+
| |
+-+
disp({'Hi, Hello!',["+-+\n| |\n+-+"],5:2:25,'Hello, bye!'}{3})
5 7 9 11 13 15 17 19 21 23 25
disp({'Hi, Hello!',["+-+\n| |\n+-+"],5:2:25,'Hello, bye!'}{4})
Hello, bye!
Stewie Griffin
  • 46.8k
  • 16
  • 137
  • 304

AltStyle によって変換されたページ (->オリジナル) /