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 Answer

Commonmark migration
Source Link

#Octave, 34

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!

#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!

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!
deleted 30 characters in body
Source Link
Stewie Griffin
  • 46.8k
  • 16
  • 137
  • 304

#Octave, 3734

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

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

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

Tests:

disp({'Hi, Hello!',[t='+["+-+',10,'|+\n| |',10,t]|\n+-+"],5:2:25,'Hello, bye!'}{1})
Hi, Hello!
disp({'Hi, Hello!',[t='+["+-+',10,'|+\n| |',10,t]|\n+-+"],5:2:25,'Hello, bye!'}{2})
+-+
| |
+-+
disp({'Hi, Hello!',[t='+["+-+',10,'|+\n| |',10,t]|\n+-+"],5:2:25,'Hello, bye!'}{3})
5 7 9 11 13 15 17 19 21 23 25
disp({'Hi, Hello!',[t='+["+-+',10,'|+\n| |',10,t]|\n+-+"],5:2:25,'Hello, bye!'}{4})
Hello, bye!

#Octave, 37

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

disp({'Hi, Hello!',[t='+-+',10,'| |',10,t],5:2:25,'Hello, bye!'}{1})

Test:

disp({'Hi, Hello!',[t='+-+',10,'| |',10,t],5:2:25,'Hello, bye!'}{1})
Hi, Hello!
disp({'Hi, Hello!',[t='+-+',10,'| |',10,t],5:2:25,'Hello, bye!'}{2})
+-+
| |
+-+
disp({'Hi, Hello!',[t='+-+',10,'| |',10,t],5:2:25,'Hello, bye!'}{3})
5 7 9 11 13 15 17 19 21 23 25
disp({'Hi, Hello!',[t='+-+',10,'| |',10,t],5:2:25,'Hello, bye!'}{4})
Hello, bye!

#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!
Source Link
Stewie Griffin
  • 46.8k
  • 16
  • 137
  • 304

#Octave, 37

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

disp({'Hi, Hello!',[t='+-+',10,'| |',10,t],5:2:25,'Hello, bye!'}{1})

Test:

disp({'Hi, Hello!',[t='+-+',10,'| |',10,t],5:2:25,'Hello, bye!'}{1})
Hi, Hello!
disp({'Hi, Hello!',[t='+-+',10,'| |',10,t],5:2:25,'Hello, bye!'}{2})
+-+
| |
+-+
disp({'Hi, Hello!',[t='+-+',10,'| |',10,t],5:2:25,'Hello, bye!'}{3})
5 7 9 11 13 15 17 19 21 23 25
disp({'Hi, Hello!',[t='+-+',10,'| |',10,t],5:2:25,'Hello, bye!'}{4})
Hello, bye!

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