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

added 1516 characters in body
Source Link
SnoringFrog
  • 1.8k
  • 19
  • 13

#6 Languages, 38 / 6^3 = 0.17617592̅5̅9̅ ###Whitespace, Brainfuck, Ruby, Labyrinth, Foo, Seriously

puts•2;#4!@•-[>+<-----]>6.§"5"•£ 
£
•£
 

###Whitespace

Try it online. (Note: my program omits the closing three linefeeds to terminate the program, I wrote/tested this on Whitelips and that produces the proper output there, but does not on Try It Online, so the linked program has those two characters added. As far as I can tell, some interpreters let you do that, others get stuck in an infinite loop without the explicit termination)

#6 Languages, 38 / 6^3 = 0.176 ###Whitespace, Brainfuck, Ruby, Labyrinth, Foo, Seriously

puts•2;#4!@•-[>+<-----]>6.§"5"•£ 
£
•£
 

###Whitespace

#6 Languages, 38 / 6^3 = 0.17592̅5̅9̅ ###Whitespace, Brainfuck, Ruby, Labyrinth, Foo, Seriously

puts•2;#4!@•-[>+<-----]>6.§"5"•£ 
£
•£
 

###Whitespace

Try it online. (Note: my program omits the closing three linefeeds to terminate the program, I wrote/tested this on Whitelips and that produces the proper output there, but does not on Try It Online, so the linked program has those two characters added. As far as I can tell, some interpreters let you do that, others get stuck in an infinite loop without the explicit termination)

added 6 characters in body
Source Link
Stewie Griffin
  • 46.8k
  • 16
  • 137
  • 304

#6 Languages, 38 / 6^3 = 0.176 ###Whitespace, Brainfuck, Ruby, Labyrinth, Foo, Seriously

#6 Languages, 38 / 6^3 = ###Whitespace, Brainfuck, Ruby, Labyrinth, Foo, Seriously

#6 Languages, 38 / 6^3 = 0.176 ###Whitespace, Brainfuck, Ruby, Labyrinth, Foo, Seriously

added 1072 characters in body
Source Link
SnoringFrog
  • 1.8k
  • 19
  • 13

#5#6 Languages, 3238 / 5^36^3 = 0.28 ###Whitespace, Brainfuck, Ruby, Labyrinth, Foo, Seriously

: space

§: 0x7f

puts•2;#4!@ @•-[>+<-----]>]>6."5"•£
£
•£
§"5"•£ 
£
•£
 

This contains unprintable characters, so here's the hexdump:

7075747320323b23342140202d5b3e2b3c2d2d2d2d2d5d3e362e7f22352220090a090a20090a

##Explanation:

###BrainfuckTry it online.

###LabyrinthTry it online.

puts•2;#4!@ -[>+<-----]>"5"]>6.•£§"5"•£
puts• skipped
 2 push 2 onto stack
 ; pop 2 from stack
 # push current stack depth (0) to stack
 4 push 4 to stack
 ! print top of stack as integer
 @ program terminates

###FooTry it online.

###Seriously Try it online.

puts•2;#4!@ -[>+<-----]>6.§"5"•£
puts•2;#4!@ -[>+<-----]> assorted stack manipulation that doesn't affect this program
 6 push 6 to the stack
 . output top of the stack
 § (0x7f) terminate program

#5 Languages, 32 / 5^3 = 0.28 ###Whitespace, Brainfuck, Ruby, Labyrinth, Foo

: space

puts•2;#4!@ -[>+<-----]>."5"•£
£
•£
 
 

##Explanation:

###Brainfuck

###Labyrinth

puts•2;#4!@ -[>+<-----]>"5".•£
puts• skipped
 2 push 2 onto stack
 ; pop 2 from stack
 # push current stack depth (0) to stack
 4 push 4 to stack
 ! print top of stack as integer
 @ program terminates

###Foo

#6 Languages, 38 / 6^3 = ###Whitespace, Brainfuck, Ruby, Labyrinth, Foo, Seriously

: space

§: 0x7f

puts•2;#4!@•-[>+<-----]>6.§"5"•£ 
£
•£
 

This contains unprintable characters, so here's the hexdump:

7075747320323b23342140202d5b3e2b3c2d2d2d2d2d5d3e362e7f22352220090a090a20090a

##Explanation:

###BrainfuckTry it online.

###LabyrinthTry it online.

puts•2;#4!@ -[>+<-----]>6.§"5"•£
puts• skipped
 2 push 2 onto stack
 ; pop 2 from stack
 # push current stack depth (0) to stack
 4 push 4 to stack
 ! print top of stack as integer
 @ program terminates

###FooTry it online.

###Seriously Try it online.

puts•2;#4!@ -[>+<-----]>6.§"5"•£
puts•2;#4!@ -[>+<-----]> assorted stack manipulation that doesn't affect this program
 6 push 6 to the stack
 . output top of the stack
 § (0x7f) terminate program
added 10 characters in body
Source Link
SnoringFrog
  • 1.8k
  • 19
  • 13
Loading
added 96 characters in body
Source Link
SnoringFrog
  • 1.8k
  • 19
  • 13
Loading
deleted 5 characters in body
Source Link
Stewie Griffin
  • 46.8k
  • 16
  • 137
  • 304
Loading
added 691 characters in body
Source Link
SnoringFrog
  • 1.8k
  • 19
  • 13
Loading
Source Link
SnoringFrog
  • 1.8k
  • 19
  • 13
Loading

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