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

replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

Jelly, 23

First program, 40 bytes

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
1£

Try it online!

Second program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
2£

Try it online!

Third program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
3£

Try it online!

Fourth program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
4£

Try it online!

How it works

In all Jelly programs, every line defines a link. The last one is the main link and is executed automatically by the interpreter.

The quick £ inspects the number before it and calls the link on that line, so it suffices to place the four individual programs on different lines and call the appropriate one.

First program

""©ĊĠȦẋạ»

This simply uses Jelly's built-in compression compression, constructing the string as Hi, (bare string), Hello (dictionary word) and ! (bare string).

Second program

5r25m2

5 sets the left argument to 5, r25 creates a range up to 25 and m2 selects every second element.

Third program

"+-+¶| "ȮṖṚ

"+-+¶| " sets the left argument to that string, Ȯ prints it explicitly, removes the last character and reverses the result. The reversed string gets printed implicitly.

Fourth program

"(ʠƤ,ụȤ»

Akin to the first program, this compresses the output string as Hello (dictionary word), , (bare string), bye (dictionary word, leading space) and ! (bare string).

Jelly, 23

First program, 40 bytes

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
1£

Try it online!

Second program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
2£

Try it online!

Third program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
3£

Try it online!

Fourth program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
4£

Try it online!

How it works

In all Jelly programs, every line defines a link. The last one is the main link and is executed automatically by the interpreter.

The quick £ inspects the number before it and calls the link on that line, so it suffices to place the four individual programs on different lines and call the appropriate one.

First program

""©ĊĠȦẋạ»

This simply uses Jelly's built-in compression, constructing the string as Hi, (bare string), Hello (dictionary word) and ! (bare string).

Second program

5r25m2

5 sets the left argument to 5, r25 creates a range up to 25 and m2 selects every second element.

Third program

"+-+¶| "ȮṖṚ

"+-+¶| " sets the left argument to that string, Ȯ prints it explicitly, removes the last character and reverses the result. The reversed string gets printed implicitly.

Fourth program

"(ʠƤ,ụȤ»

Akin to the first program, this compresses the output string as Hello (dictionary word), , (bare string), bye (dictionary word, leading space) and ! (bare string).

Jelly, 23

First program, 40 bytes

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
1£

Try it online!

Second program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
2£

Try it online!

Third program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
3£

Try it online!

Fourth program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
4£

Try it online!

How it works

In all Jelly programs, every line defines a link. The last one is the main link and is executed automatically by the interpreter.

The quick £ inspects the number before it and calls the link on that line, so it suffices to place the four individual programs on different lines and call the appropriate one.

First program

""©ĊĠȦẋạ»

This simply uses Jelly's built-in compression, constructing the string as Hi, (bare string), Hello (dictionary word) and ! (bare string).

Second program

5r25m2

5 sets the left argument to 5, r25 creates a range up to 25 and m2 selects every second element.

Third program

"+-+¶| "ȮṖṚ

"+-+¶| " sets the left argument to that string, Ȯ prints it explicitly, removes the last character and reverses the result. The reversed string gets printed implicitly.

Fourth program

"(ʠƤ,ụȤ»

Akin to the first program, this compresses the output string as Hello (dictionary word), , (bare string), bye (dictionary word, leading space) and ! (bare string).

deleted 20 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Jelly, 23

First program, 40 bytes

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
1£

Try it online!

Second program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
2£

Try it online!

Third program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
3£

Try it online!

Fourth program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
4£

Try it online!

How it works

How it works

In all Jelly programs, every line defines a link (Jelly's functions). The last one is the main link and is executed automatically by the interpreter.

The quick £ inspects the number before it and calls the link on that line, so it suffices to place the four individual programs on different lines and call the appropriate one.

First program

""©ĊĠȦẋạ»

This simply uses Jelly's builtinbuilt-in compression, constructing the string as Hi, (bare string), Hello (dictionary word) and ! (bare string).

Second program

5r25m2

5 sets the left argument to 5, r25 creates a range up to 25 and m2 selects every second element.

Third program

"+-+¶| "ȮṖṚ

"+-+¶| " sets the left argument to that string, Ȯ prints it explicitly, removes the last character and reverses the result. The reversed string gets printed implicitly.

Fourth program

"(ʠƤ,ụȤ»

Akin to the first program, this compresses the output string as Hello (dictionary word), , (bare string), bye (dictionary word, leading space) and ! (bare string).

Jelly, 23

First program, 40 bytes

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
1£

Try it online!

Second program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
2£

Try it online!

Third program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
3£

Try it online!

Fourth program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
4£

Try it online!

How it works

In all Jelly programs, every line defines a link (Jelly's functions). The last one is the main link and is executed automatically by the interpreter.

The quick £ inspects the number before it and calls the link on that line, so it suffices to place the four individual programs on different lines and call the appropriate one.

First program

""©ĊĠȦẋạ»

This simply uses Jelly's builtin compression, constructing the string as Hi, (bare string), Hello (dictionary word) and ! (bare string).

Second program

5r25m2

5 sets the left argument to 5, r25 creates a range up to 25 and m2 selects every second element.

Third program

"+-+¶| "ȮṖṚ

"+-+¶| " sets the left argument to that string, Ȯ prints it explicitly, removes the last character and reverses the result. The reversed string gets printed implicitly.

Fourth program

"(ʠƤ,ụȤ»

Akin to the first program, this compresses the output string as Hello (dictionary word), , (bare string), bye (dictionary word, leading space) and ! (bare string).

Jelly, 23

First program, 40 bytes

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
1£

Try it online!

Second program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
2£

Try it online!

Third program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
3£

Try it online!

Fourth program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
4£

Try it online!

How it works

In all Jelly programs, every line defines a link. The last one is the main link and is executed automatically by the interpreter.

The quick £ inspects the number before it and calls the link on that line, so it suffices to place the four individual programs on different lines and call the appropriate one.

First program

""©ĊĠȦẋạ»

This simply uses Jelly's built-in compression, constructing the string as Hi, (bare string), Hello (dictionary word) and ! (bare string).

Second program

5r25m2

5 sets the left argument to 5, r25 creates a range up to 25 and m2 selects every second element.

Third program

"+-+¶| "ȮṖṚ

"+-+¶| " sets the left argument to that string, Ȯ prints it explicitly, removes the last character and reverses the result. The reversed string gets printed implicitly.

Fourth program

"(ʠƤ,ụȤ»

Akin to the first program, this compresses the output string as Hello (dictionary word), , (bare string), bye (dictionary word, leading space) and ! (bare string).

added 1192 characters in body
Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830

Jelly, 23

First program, 40 bytes

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
1£

Try it online!

Second program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
2£

Try it online!

Third program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
3£

Try it online!

Fourth program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
4£

Try it online!

How it works

In all Jelly programs, every line defines a link (Jelly's functions). The last one is the main link and is executed automatically by the interpreter.

The quick £ inspects the number before it and calls the link on that line, so it suffices to place the four individual programs on different lines and call the appropriate one.

First program

""©ĊĠȦẋạ»

This simply uses Jelly's builtin compression , constructing the string as Hi, (bare string), Hello (dictionary word) and ! (bare string).

Second program

5r25m2

5 sets the left argument to 5, r25 creates a range up to 25 and m2 selects every second element.

Third program

"+-+¶| "ȮṖṚ

"+-+¶| " sets the left argument to that string, Ȯ prints it explicitly, removes the last character and reverses the result. The reversed string gets printed implicitly.

Fourth program

"(ʠƤ,ụȤ»

Akin to the first program, this compresses the output string as Hello (dictionary word), , (bare string), bye (dictionary word, leading space) and ! (bare string).

Jelly, 23

First program, 40 bytes

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
1£

Try it online!

Second program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
2£

Try it online!

Third program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
3£

Try it online!

Fourth program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
4£

Try it online!

Jelly, 23

First program, 40 bytes

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
1£

Try it online!

Second program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
2£

Try it online!

Third program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
3£

Try it online!

Fourth program, edit distance 1

""©ĊĠȦẋạ»
5r25m2
"+-+¶| "ȮṖṚ
"(ʠƤ,ụȤ»
4£

Try it online!

How it works

In all Jelly programs, every line defines a link (Jelly's functions). The last one is the main link and is executed automatically by the interpreter.

The quick £ inspects the number before it and calls the link on that line, so it suffices to place the four individual programs on different lines and call the appropriate one.

First program

""©ĊĠȦẋạ»

This simply uses Jelly's builtin compression , constructing the string as Hi, (bare string), Hello (dictionary word) and ! (bare string).

Second program

5r25m2

5 sets the left argument to 5, r25 creates a range up to 25 and m2 selects every second element.

Third program

"+-+¶| "ȮṖṚ

"+-+¶| " sets the left argument to that string, Ȯ prints it explicitly, removes the last character and reverses the result. The reversed string gets printed implicitly.

Fourth program

"(ʠƤ,ụȤ»

Akin to the first program, this compresses the output string as Hello (dictionary word), , (bare string), bye (dictionary word, leading space) and ! (bare string).

Source Link
Dennis
  • 211.7k
  • 41
  • 380
  • 830
Loading

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