1
\$\begingroup\$

This question already has an answer here:

Main objective

The main objective is to output a text, it doesn't mind which text or where the text gets its output (it can be on a browser window, the default console etc).

It just requires the condition that what is output must be indeed "real chars" (the ones in UNICODE for example), it's not considered valid to display graphics that simulate chars.

Condition to program

Now into the conditions to program:

None of the characters that appear in the code must appear in the output.

The created string cannot be infinite (continuosly being created in a loop without end)

Test cases

So let's say that you code is

abcdef

If that displayed

ghijk

The code would be valid, but if this displayed:

chiij

Then it would not be valid

Obviously something like

print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");

That displays

 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

would be invalid.

Challenge

Write a code that displays a text as defined.

Scoring

In this , your answer is scored by the ratio between string length and number of bytes in code (string length / code length), where the highest score wins.

Good luck!

\$\endgroup\$

marked as duplicate by Stephen, Mr. Xcoder, vaultah, Rɪᴋᴇʀ, Peter Taylor Jul 30 '17 at 20:04

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 3
    \$\begingroup\$ @StepHen How would this be a dupe of that? \$\endgroup\$ – Mr. Xcoder Jul 30 '17 at 19:51
  • \$\begingroup\$ @Mr.Xcoder anyone can just copy the top answers there and destroy any answer currently on here? \$\endgroup\$ – Stephen Jul 30 '17 at 19:51
  • \$\begingroup\$ @StepHen Yeah, you're right. The first one has > 100E score here. \$\endgroup\$ – Mr. Xcoder Jul 30 '17 at 19:53
  • \$\begingroup\$ Fwiw I voted to close as too broad. \$\endgroup\$ – Peter Taylor Jul 30 '17 at 20:06
  • \$\begingroup\$ The empty program in Japt prints undefined, would that give it a score of 9/0 = infinity? \$\endgroup\$ – ETHproductions Jul 30 '17 at 20:49
3
\$\begingroup\$

Jelly, 0 bytes, score: 1/0 = ∞



Try it online!

That's right, the empty program in Jelly prints 0.

Jelly, 5 bytes, score: 1000.6

⁶³ȷ³x

Try it online!

Jelly, 2 bytes, score: 95 / 2 = 47.5

ØṖ

Try it online!

This yields the set of all printable ASCII: !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ and a space (95 bytes)

\$\endgroup\$
  • \$\begingroup\$ The same score, ∞ can be achieved in 0 bytes in Stuck, in which the empty program prints Hello, World! \$\endgroup\$ – Mr. Xcoder Aug 2 '17 at 13:52
1
\$\begingroup\$

Pyth, 1 byte, score: 26

G

Try it online

This outputs: abcdefghijklmnopqrstuvwxyz (26 bytes).

\$\endgroup\$
0
\$\begingroup\$

Python 2, 14 bytes, score 27672892.1429

print"\n"*9**9

Prints 387420490 newlines. Output truncated on TIO.

Try it online!

\$\endgroup\$
  • \$\begingroup\$ print"\n"*19**19 would have a score of 1,236512285E23 :) \$\endgroup\$ – Mr. Xcoder Jul 31 '17 at 12:13
  • \$\begingroup\$ @Mr.Xcoder I could not find an interpreter where larger numbers would work. Slightly larger numbers throw either MemoryError or IOError. Your number gives OverflowError: cannot fit 'long' into an index-sized integer \$\endgroup\$ – musicman523 Jul 31 '17 at 16:09
0
\$\begingroup\$

Python 3, 91 bytes, score = 67067/91 = 737

s="s=forinage(35,127):chtp*0"
for f in range(35,127):
 if chr(f)not in s:print(chr(f)*1000)

Try it online!

\$\endgroup\$
0
\$\begingroup\$

cQuents, score: 1.8530202E33 / 9 bytes = 2.0589113E32

#9^8e9::n

Score is based on math, not runs of the program.

Prints 43046721000000000 copies of 43046721000000000 joined on ,.

Explanation

 #9^8e9      n = (9^8) * 10^9
       ::    Print the sequence from 1 to n
         n   Each item in the sequence equals n

Try it online! (truncated)

\$\endgroup\$
  • \$\begingroup\$ The score is 3,87420489E17 \$\endgroup\$ – Mr. Xcoder Jul 30 '17 at 20:05
  • \$\begingroup\$ @Mr.Xcoder made it bigger, so the score's bigger \$\endgroup\$ – Stephen Jul 30 '17 at 20:09

Not the answer you're looking for? Browse other questions tagged or ask your own question.