123
\$\begingroup\$

Create the shortest possible obfuscated program that displays the text "Hello World".

In order to be considered an obfuscated program, it must meet at least two of the following requirements:

  • Does not contain the characters: h, l, w and d in any case
  • Does not contain the characters: e, o, r, 0, and 1 in any case
  • Does not contain the characters: 2 or 7

Input:
none

Output:
Hello World

\$\endgroup\$
  • 6
    \$\begingroup\$ I guess import in python is not permitted. \$\endgroup\$ – Alexandru Feb 1 '11 at 0:07
  • 26
    \$\begingroup\$ Does these rules apply to language keywords as well? \$\endgroup\$ – hallvabo Feb 1 '11 at 13:04
  • 8
    \$\begingroup\$ are those case insensitive restrictions? \$\endgroup\$ – oenone Aug 4 '11 at 14:22
  • 20
    \$\begingroup\$ Could someone explain why 2 and 7 are not allowed? I'm just curious as I don't see why those were chosen in particular. \$\endgroup\$ – Thomas Eding Aug 5 '11 at 23:01
  • 4
    \$\begingroup\$ @trinithis, and others, ASCII character 72 is "H" which is why I chose those two \$\endgroup\$ – Kevin Brown Sep 18 '11 at 23:18

123 Answers 123

0
\$\begingroup\$

Python 3, 85 bytes

Not golfed, but obfuscated.

input(('%c'*11)%(9*8,93+8,99+9,9+99,3999//36,4*8,9*9+6,3996//36,4353//38,36*3,5*4*5))

Try it online!

\$\endgroup\$
  • 1
    \$\begingroup\$ From a golfing standpoint, the fact that you're already using 11 to break rule 2 means that every code point except 72, 32, and 87 are valid (since 0 will also be allowed). From an obfuscation standpoint, I'm sure there are more creative and fun numbers you can use, like idk, 33**3//399-3 for 87, 3225%346 for 111, etc. \$\endgroup\$ – Value Ink Jun 7 at 21:45
0
\$\begingroup\$

Ruby, 46 bytes

Aims to match all rules, unlike the other Ruby answers that only match 2. Based on @Nemo157's original answer and subsequent improvement suggestions, but uses succ twice to avoid breaking rule 1.

Note that the TIO link creates a string and compares it to a regex (proving that it matches all the rules) and then evals it, instead of just running the code directly. Running it directly will still work, of course.

$><<"Fcjjm Umpjb".gsub(/[a-z]/i){$&.succ.succ}

Try it online!

Ruby, 31 bytes

Same technique, but using tricks with tr to make it shorter than the other Ruby answers. (Unfortunately, tr causes it to break rule 2.)

puts"Fcjjm Umpjb".tr'A-x','C-z'

Try it online!

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

Help, Wardoq!, 1 byte, Rules #2 and #3

l

This esolang has a 1-byte solution for most spellings of Hello, World.

\$\endgroup\$

protected by Community Dec 9 '18 at 22:11

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

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