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

Post Undeleted by caird coinheringaahing
Post Deleted by Community Bot
-1 byte thanks to Teal pelican
Source Link
user58288
user58288

><>, 7(削除) 7 (削除ここまで) 6 bytes

-1 byte thanks to Teal pelican

0\ln;
\ln; 0

Try it online! Try it online!
Try it doubled!

(note the trailing newline and space)Try it doubled!

Explanation

I used a 0 but I could have also used 1-9, a-f because they all push a single value onto the stack.

The trailing space is there to align the 0 in the second copy of the code under the \ of the first.

Not doubled:

\ redirects execution down
0 pushes zero onto stack; STACK: [0]
\ redirects execution down
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (1) onto stack; STACK: [0, 1]
n pops off the top value (1) and prints it; STACK: [0]
; end of execution

Doubled:

\ redirects execution down
0 pushes zero onto stack; STACK: [0]
\ redirects execution down
0 pushes zero onto stack; STACK: [0, 0]
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (2) onto stack; STACK: [0, 0, 2]
n pops off the top value (2) and prints it; STACK: [0, 0]
; end of execution

><>, 7 bytes

0\ln;

Try it online!
Try it doubled!

(note the trailing newline and space)

Explanation

I used a 0 but I could have also used 1-9, a-f because they all push a single value onto the stack.

The trailing space is there to align the 0 in the second copy of the code under the \ of the first.

Not doubled:

0 pushes zero onto stack; STACK: [0]
\ redirects execution down
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (1) onto stack; STACK: [0, 1]
n pops off the top value (1) and prints it; STACK: [0]
; end of execution

Doubled:

0 pushes zero onto stack; STACK: [0]
\ redirects execution down
0 pushes zero onto stack; STACK: [0, 0]
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (2) onto stack; STACK: [0, 0, 2]
n pops off the top value (2) and prints it; STACK: [0, 0]
; end of execution

><>, (削除) 7 (削除ここまで) 6 bytes

-1 byte thanks to Teal pelican

\ln;
0

Try it online!
Try it doubled!

Explanation

I used a 0 but I could have also used 1-9, a-f because they all push a single value onto the stack.

Not doubled:

\ redirects execution down
0 pushes zero onto stack; STACK: [0]
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (1) onto stack; STACK: [0, 1]
n pops off the top value (1) and prints it; STACK: [0]
; end of execution

Doubled:

\ redirects execution down
0 pushes zero onto stack; STACK: [0]
0 pushes zero onto stack; STACK: [0, 0]
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (2) onto stack; STACK: [0, 0, 2]
n pops off the top value (2) and prints it; STACK: [0, 0]
; end of execution
Added link to try the doubled version online, changed the code to a <pre> block
Source Link
user58288
user58288

><>, 7 bytes

0\ln;
 
0\ln;

Try it online!
Try it doubled!

(note the trailing newline and space)

Explanation

I used a 0 but I could have also used 1-9, a-f because they all push a single value onto the stack.

The trailing space is there to align the 0 in the second copy of the code under the \ of the first.

Not doubled:

0 pushes zero onto stack; STACK: [0]
\ redirects execution down
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (1) onto stack; STACK: [0, 1]
n pops off the top value (1) and prints it; STACK: [0]
; end of execution

Doubled:

0 pushes zero onto stack; STACK: [0]
\ redirects execution down
0 pushes zero onto stack; STACK: [0, 0]
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (2) onto stack; STACK: [0, 0, 2]
n pops off the top value (2) and prints it; STACK: [0, 0]
; end of execution

><>, 7 bytes

0\ln;
 

Try it online!

(note the trailing newline and space)

Explanation

I used a 0 but I could have also used 1-9, a-f because they all push a single value onto the stack.

The trailing space is there to align the 0 in the second copy of the code under the \ of the first.

Not doubled:

0 pushes zero onto stack; STACK: [0]
\ redirects execution down
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (1) onto stack; STACK: [0, 1]
n pops off the top value (1) and prints it; STACK: [0]
; end of execution

Doubled:

0 pushes zero onto stack; STACK: [0]
\ redirects execution down
0 pushes zero onto stack; STACK: [0, 0]
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (2) onto stack; STACK: [0, 0, 2]
n pops off the top value (2) and prints it; STACK: [0, 0]
; end of execution

><>, 7 bytes

0\ln;

Try it online!
Try it doubled!

(note the trailing newline and space)

Explanation

I used a 0 but I could have also used 1-9, a-f because they all push a single value onto the stack.

The trailing space is there to align the 0 in the second copy of the code under the \ of the first.

Not doubled:

0 pushes zero onto stack; STACK: [0]
\ redirects execution down
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (1) onto stack; STACK: [0, 1]
n pops off the top value (1) and prints it; STACK: [0]
; end of execution

Doubled:

0 pushes zero onto stack; STACK: [0]
\ redirects execution down
0 pushes zero onto stack; STACK: [0, 0]
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (2) onto stack; STACK: [0, 0, 2]
n pops off the top value (2) and prints it; STACK: [0, 0]
; end of execution
Source Link
user58288
user58288

><>, 7 bytes

0\ln;
 

Try it online!

(note the trailing newline and space)

Explanation

I used a 0 but I could have also used 1-9, a-f because they all push a single value onto the stack.

The trailing space is there to align the 0 in the second copy of the code under the \ of the first.

Not doubled:

0 pushes zero onto stack; STACK: [0]
\ redirects execution down
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (1) onto stack; STACK: [0, 1]
n pops off the top value (1) and prints it; STACK: [0]
; end of execution

Doubled:

0 pushes zero onto stack; STACK: [0]
\ redirects execution down
0 pushes zero onto stack; STACK: [0, 0]
 (IP wraps around the bottom)
\ redirects execution right
l pushes stack length (2) onto stack; STACK: [0, 0, 2]
n pops off the top value (2) and prints it; STACK: [0, 0]
; end of execution

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