27
\$\begingroup\$

The task is simple: print The quick brown fox jumps over the lazy dog using as few distinct characters in your source code as possible.

print "The quick brown fox jumps over the lazy dog" has a score of 29 characters, as all 26 lowercase letters appear at least once, as well as an uppercase T, spaces, and quote characters. I'm sure you can get more creative than that, though!

Brainfuck, Whitespace, and similar languages (at my discretion) are disallowed. Line breaks count as one character. The code may be as long as necessary. I'll accept a solution on April 21, 11:59 PM EST. In the event of a tie, the shorter answer will be accepted.

\$\endgroup\$
  • \$\begingroup\$ OP you could make this more fun by requiring that users write a program that takes a string as input and outputs another program that prints the input string with as few chars as possible. \$\endgroup\$ – Soham Chowdhury Apr 17 '13 at 10:58
  • \$\begingroup\$ Is the output case sensitive? \$\endgroup\$ – zzzzBov Apr 17 '13 at 13:57
  • \$\begingroup\$ @zzzzBov: yes, the leading T needs to be uppercase and everything else lowercase. \$\endgroup\$ – Fraxtil Apr 17 '13 at 22:53
  • \$\begingroup\$ Can we make least-characters an official criteria and tag, like code-golf \$\endgroup\$ – EAKAE Apr 18 '13 at 1:14
  • 2
    \$\begingroup\$ @EAKAE, how many different questions like this would actually be interesting? Many of the answers here are general solutions that can execute arbitrary code. \$\endgroup\$ – user7486 Apr 18 '13 at 11:18

24 Answers 24

12
\$\begingroup\$

dc: 4 distinct chars (384 375 363 361 360 350 chars in total)

A short answer (but far from the shortest possible, I'm still working on it) using only 4 distinct characters and 384 375 363 361 360 350 characters in total, I hope you will find it entirely self-explanatory:

11d1+ddd++d++dP+1+1+ddd1+ddddd1+dd1+1+ddd1+1+1+PP1d+d+d+d+d+P11+1+dP1d+d++P1d+d++PP1d+d+d++P1d+d+d+d+d+PP111dd1+1+1+PP1d+d+d++P11+1+P1d+d+d+d+d+P1d+d++P111P1d+d+d++ddd11+1+1+1+P1d+d+d+d+d+PP11+P1+1+1+dP1+1+1+dP1+1+1+dP1d+d+d+d+d+P111P1+1+1+P1+1+1+dddP11+1+1+dP1d+d+d+d+d+P1+1+P1+1+1+PP1d+d+d+d+d+P11+PP11dd+dd+d+++d1+PP1d+d+d+d+d+P1+1+1+dP111P1+1+1+P

The earlier answer that is slightly more verbose (it contains 13916 1's):

1111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111 11/P1111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/P11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P11111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P111P11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/P11111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P111P11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/P111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/P111P1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111 11/P11111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/P111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111 11/P1111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/P111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P1111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/P11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P111P1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/11/P111 11/P

Ah, you just gotta love the ole' trusty desk calculator!

\$\endgroup\$
  • 1
    \$\begingroup\$ Because you and Peter are currently tied with 4 characters each, I've updated the rules to state that if it's still a tie when the deadline arrives, I'll accept the shorter answer. As such, you might want to consider doing what you described in the last paragraph. \$\endgroup\$ – Fraxtil Apr 18 '13 at 1:28
  • \$\begingroup\$ A really short and nice answer is underway. \$\endgroup\$ – Fors Apr 18 '13 at 13:59
22
\$\begingroup\$

64-bit Intel machine code for Linux in binary: 2 distinct characters

01111111010001010100110001000110000000100000000100000001000000000000000000000000
00000000000000000000000000000000000000000000000000000010000000000011111000000000
00000001000000000000000000000000011110000000000001000000000000000000000000000000
00000000000000000100000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000100000000000000001110000000000000000001000000000000000000000000
00000000000000000000000000000000000000010000000000000000000000000000010100000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000100000000000000000000000000000000000000000000000000000000000000
01000000000000000000000000000000000000000000000011001011000000000000000000000000
00000000000000000000000000000000110010110000000000000000000000000000000000000000
00000000000000000000000000000000001000000000000000000000000000000000000000000000
10111000000000010000000000000000000000001011111100000001000000000000000000000000
01001000101111101001111100000000010000000000000000000000000000000000000000000000
10111010001011000000000000000000000000000000111100000101101110000011110000000000
00000000000000001011111100000000000000000000000000000000000011110000010101010100
01101000011001010010000001110001011101010110100101100011011010110010000001100010
01110010011011110111011101101110001000000110011001101111011110000010000001101010
01110101011011010111000001110011001000000110111101110110011001010111001000100000
01110100011010000110010100100000011011000110000101111010011110010010000001100100
011011110110011100001010

I refuse to rewrite it in unary.

\$\endgroup\$
  • 7
    \$\begingroup\$ So there's no standard tool to convert this into an executable, and the same encoding could be applied equally to any of the other answers? \$\endgroup\$ – Peter Taylor Apr 17 '13 at 9:49
  • 1
    \$\begingroup\$ If you refuse to call home.paulschou.net/tools/xlate a "standard tool", then no. But it certainly existed when this challenge started. \$\endgroup\$ – Fors Apr 17 '13 at 10:48
  • 2
    \$\begingroup\$ This could be seen as source code, as it only needs a single tool to become machine code. \$\endgroup\$ – Fors Apr 17 '13 at 11:57
  • 5
    \$\begingroup\$ People just can't appreciate it for what it is... Maybe they're butt-hurt? \$\endgroup\$ – jdstankosky Apr 17 '13 at 12:46
  • 20
    \$\begingroup\$ Sorry, but I'm going to have to disqualify this for the same reason as why I disallowed Brainfuck and Whitespace. When the language in question is limited to a small number of characters (8 for Brainfuck, 3 for Whitespace, 2 for any binary representation), it has an obviously unfair advantage over other submissions. \$\endgroup\$ – Fraxtil Apr 17 '13 at 22:48
19
\$\begingroup\$

Lua, 8 distinct characters

load"load\"load\\\"load\\\\\\\"load\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\5\50\\5\55\\\\0
\\5\50\\05\55\50\\\\\\\\\\\\\\5\50\\5\55\\\\0\\5\50\\5\55\\5\50\\\\\\\\\\\\0\\5\
50\\05\05505\\\\\\\\\\\\\\5\50\\5\55\\\\0\\5\50\\05\0550\\\\\\\\\\\\\\5\50\\5\55
\\\\\\5\50\\5\55\\\\5\\5\50\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\\\\\\\
\\\05\\\\05\\5\50\\5\50\\\\\\\\\\\\0\\5\50\\05\0550\\5\50\\\\\\\\\\\\0\\5\50\\05
\0550\\\\\\5\50\\5\55\\\\\\\\\\\\\\\\\\\\\\\\05\\\\0\\5\50\\05\55\50\\\\\\\\\\\\
\\\\\\\\\\5\50\\5\55\\\\\\5\50\\5\55\\\\\\\\5\\\\\\5\50\\5\55\\\\\\\\\\\\\\5\50\
\5\55\\\\0\\5\50\\05\55\55\\\\\\\\\\\\0\\5\50\\05\05505\\\\\\5\55\\5\55\\\\\\\\\
\\\0\\5\50\\05\0550\55\\\\\\\\\\\\\\\\\\\\\\\\05\\\\0\\5\50\\05\55\50\\\\\\\\\\\
\\\\\\\5\55\\\\\\\\5\\\\5\\5\50\\\\\\\\\\\\\\5\50\\5\55\\\\0\\5\50\\5\55\\5\50o\
\\\\\\\\\\\\\5\50\\5\55\\\\0\\5\50\\5\55\\5\55\\\\\\\\\\\\\\5\50\\5\55\\\\0\\5\5
0\\05\0550\\\\\\\\\\\\\\\\\\\\\\\\05\\\\0\\5\50\\05\55\50\\\\\\\\\\\\0\\5\50\\05
\0550\50o\\\\\\\\\\\\0\\5\50\\05\55\0500\\\\\\\\\\\\\\\\\\\\\\\\05\\\\0\\5\50\\0
5\55\50\\\\\\\\\\\\0\\5\50\\05\0550\\\\5\\5\50\\\\\\\\\\\\\\5\50\\5\55\\\\0\\5\5
0\\05\55\55\\\\\\\\\\\\0\\5\50\\05\0550\\5\55\\\\\\\\\\\\\\5\50\\5\55\\\\0\\5\50
\\05\55\50\\\\\\\\\\\\\\5\50\\5\55\\\\0\\5\50\\05\0555\\\\\\\\\\\\\\\\\\\\\\\\05
\\\\0\\5\50\\05\55\50o\\\\\\\\\\\\\\\\\\\\\\5\50\\5\55\\\\\\5\50\\5\55\\\\\\\\5\
\\\5\\5\50\\\\\\\\\\\\0\\5\50\\05\0550\\\\\\5\50\\5\55\\\\\\\\\\\\\\5\50\\5\55\\
\\0\\5\50\\5\55\\5\50\\\\\\\\\\\\\\\\\\\\\\\\05\\\\0\\5\50\\05\55\50\\\\\\\\\\\\
\\5\50\\5\55\\\\\\5\50\\5\55\\\\5\\5\50\\\\\\\\\\\\0\\5\50\\05\0550\\5\50\\\\\\\
\\\\\0\\5\50\\05\0550\\\\\\5\50\\5\55\\\\\\\\\\\\\\\\\\\\\\\\05\\\\0\\5\50\\05\5
5\50la\\\\\\\\\\\\0\\5\50\\05\55\50\50\\\\\\\\\\\\0\\5\50\\05\55\50\\\\\\5\50\\5
\55\\\\\\\\\\\\\\\\\\\\\\\\05\\\\0\\5\50\\05\55\50do\\\\\\\\\\\\\\\\\\\\0\\5\50\
\05\0550\\\\\\\\5\\\\\\5\50\\5\55\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\
"\\\\\\\\\\\\\\\"\\\\\\\\\\\\\\\"\\\\\\\"\\\\\\\"\\\\\\\"\\\"\\\"\\\"\"\"\""""

All newline characters must be removed from this code to get single line of length 1998.
Lua 5.2 required


How arbitrary Lua program could be written using only 8 characters load"\05

Having chars 05\, it is possible to write string literal for any string consisting of chars 0257\. Indeed, "\\" means backslash, "2" == "\50" and "7" == "\55" ("\ddd" in Lua means char with decimal code ddd).
Having chars 0257\, it is possible to write string literal for any string consisting of chars 024579\ (as "4" == "\52" and "9" == "\57")
On the next step chars 01245679\ will become available.
One more step is required to get all decimal digits.

Lua has function load which treats a string as Lua code and converts it to a function.
E.g., load("print\"Hello\"")() prints Hello.
It could be written without parentheses: load"print\"Hello\"""" (last two quotes mean empty string which is passed as optional parameter to the function).
Any Lua program could be converted to reduced alphabet within at most 5 steps.
Example: If our program consists of single digit 9, then only two steps are required:
step 0: 9
step 1: load"\57"""
step 2: load"load\"\\5\55\"\"\""""

\$\endgroup\$
14
\$\begingroup\$

Python, 9

Using this idea. (The line breaks are there for readability and can be removed.)

exec(chr(111+1)+chr(111+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1)+chr(11
+11+11+11+11+11+11+11+11+11)+chr(111+1+1+1+1+1)+chr(11+11+11+1)+chr(11+11+11+11
+11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1)+chr(11+11+11+
11+11+11+11+11+11+1+1)+chr(11+11+1+1+1+1+1+1+1+1+1+1)+chr(111+1+1)+chr(111+1+1+1
+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+
11)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1)+chr(11+11+1+1+1+1+1+1+1+1+1+
1)+chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)+chr(111+1+1+1)+chr(111)+chr(
111+1+1+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+11)+chr(11+11+1+1+1+1+1+1+1+
1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1)+chr(111)+chr(111+1+1+1+1+1+1+1+1+1)
+chr(11+11+1+1+1+1+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1)+chr
(111+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)+chr(111+1
)+chr(111+1+1+1+1)+chr(11+11+1+1+1+1+1+1+1+1+1+1)+chr(111)+chr(111+1+1+1+1+1+1+1
)+chr(11+11+11+11+11+11+11+11+11+1+1)+chr(111+1+1+1)+chr(11+11+1+1+1+1+1+1+1+1+1
+1)+chr(111+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1)+chr(11+11+11+11
+11+11+11+11+11+1+1)+chr(11+11+1+1+1+1+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+
11+1+1+1+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)+chr(111+11)
+chr(111+1+1+1+1+1+1+1+1+1+1)+chr(11+11+1+1+1+1+1+1+1+1+1+1)+chr(11+11+11+11+11+
11+11+11+11+1)+chr(111)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1)+chr(11+11+11+1))

This builds the string 'print"The quick brown fox jumps over the lazy dog"' and executes it.

\$\endgroup\$
  • \$\begingroup\$ The challenge is to print the phrase, not write a program. I reckon you can remove the exec, say you run it on the python shell and claim 7 chars. \$\endgroup\$ – Griffin Apr 16 '13 at 23:57
  • 12
    \$\begingroup\$ Using 11 and 111 too makes it shorter and elegant elegant. \$\endgroup\$ – randomra Apr 17 '13 at 0:24
  • 4
    \$\begingroup\$ "readability" - heh. \$\endgroup\$ – user7486 Apr 17 '13 at 7:16
  • \$\begingroup\$ @Griffin, just generating the string instead of outputting it changes the challenge too much. For example the Ruby solution would take only 4 characters. \$\endgroup\$ – manatwork Apr 17 '13 at 11:21
  • \$\begingroup\$ @randomra: Good point, that does make it a lot shorter. \$\endgroup\$ – flornquake Apr 17 '13 at 13:58
8
\$\begingroup\$

dc - 5 distinct characters (2,i,1,0,P)

2i01010100011010000110010100100000011100010111010101101001011000110110101100100000011000100111001001101111011101110110111000100000011001100110111101111000001000000110101001110101011011010111000001110011001000000110111101110110011001010111001000100000011101000110100001100101001000000110110001100001011110100111100100100000011001000110111101100111P
\$\endgroup\$
7
\$\begingroup\$

Tcl 10 different chars.

\160\165\164\163 \124\150\145\40\161\165\151\143\153\40\142\162\157\167\156\40\146\157\170\40\152\165\155\160\163\40\157\166\145\162\40\164\150\145\40\154\141\172\171\40\144\157\147

Characters used: , 0, 1, 2, 3, 4, 5, 6, 7, \

It's just each part of the command encoded as \ooo sequence. For Tcl, it does not matter if you do such funny things in the command name or in his arguments, in fact the $object configure is very common in Tcl/Tk.
With this technique and eval you could even write every program in Tcl with 10 different bytes :)

Test program:

set code [read stdin]
puts "Characters used: `[join [set ch [lsort -unique [split $code {}]]] {`, `}]`
puts "Number of different characters: [llength $ch]"
\$\endgroup\$
  • 1
    \$\begingroup\$ +1. A similar trick works in Java with \uXXXX for 18 different bytes. \$\endgroup\$ – Peter Taylor Apr 17 '13 at 8:33
7
\$\begingroup\$

GolfScript (4 distinct chars, 441 chars total)

11(11+11+11+11+11+11+11+(((111(((((((111((((((((((11(11+11+111(1+1+1+111(11+((((111((((((111((((((((((((111((((11(11+11+111(((((((((((((111(1+1+1+1+111(1+111(11+((111(11(11+11+111(((((((((111(1+111(11+(11(11+11+111(((((111(11+((((111((111(1+1+111(11+((((((11(11+11+111(1+111(11+(((111((((((((((111(1+1+1+1+11(11+11+111(11+(((((111(((((((111((((((((((11(11+11+111(((111((((((((((((((111(11+1+111(11+11(11+11+111(((((((((((111(1+111((((((((](+

Chars used: ]1(+

Explanation: in GolfScript, adding a string to an array of integers converts the array into a string with the integers as codepoints and then concatenates the two strings. If nothing is supplied on stdin, the stack starts with an empty string. So we can build an array of integers with the right codepoints and then concatenate to that empty string.

We'll need + for the concatenation, ] at minimum to create the array (and either [ to prevent the empty string from being included in it or some way of extracting it afterwards), and some way of separating the integers. So I use the decrement operator ( to separate the integers, which requires some extra additions to compensate in some cases but gives a quick way of getting e.g. 110; and that operator is also the operator to extract the first element from an array, so it serves to retrieve the empty string for concatenation.

\$\endgroup\$
  • \$\begingroup\$ Because you and Fors are currently tied with 4 characters each, I've updated the rules to state that if it's still a tie when the deadline arrives, I'll accept the shorter answer. Your answer is significantly shorter at the moment, but it would be unfair of me to notify him and not you. :) \$\endgroup\$ – Fraxtil Apr 18 '13 at 1:29
6
\$\begingroup\$

Ruby: 7 distinct characters

(With thanks to randomra for his comment.)

$>.<<""<<11+11+11+11+11+11+11+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1<<11+11+1+1+1+1+1+1+1+1+1+1<<111+1+1<<111+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11<<11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1<<11+11+1+1+1+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1<<111+1+1+1<<111<<111+1+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+11<<11+11+1+1+1+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1+1<<111<<111+1+1+1+1+1+1+1+1+1<<11+11+1+1+1+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1<<111+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1<<111+1<<111+1+1+1+1<<11+11+1+1+1+1+1+1+1+1+1+1<<111<<111+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1<<111+1+1+1<<11+11+1+1+1+1+1+1+1+1+1+1<<111+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1<<11+11+1+1+1+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1<<111+11<<111+1+1+1+1+1+1+1+1+1+1<<11+11+1+1+1+1+1+1+1+1+1+1<<11+11+11+11+11+11+11+11+11+1<<111<<11+11+11+11+11+11+11+11+11+1+1+1+1

Sample run:

bash-4.2$ ruby distinctchar.rb
The quick brown fox jumps over the lazy dog

Counting:

bash-4.2$ sed 's/./&\n/g' distinctchar.rb | sort -u | wc -l
7

bash-4.2$ sed 's/./&\n/g' distinctchar.rb | sort | uniq -c
     88 <
      1 >
      1 .
      2 "
      1 $
    384 +
    637 1
\$\endgroup\$
5
\$\begingroup\$

Java: 18 distinct characters

\u0063\u006C\u0061\u0073\u0073\u0020\u0054\u007B\u0070\u0075\u0062\u006C\u0069\u0063\u0020\u0073\u0074\u0061\u0074\u0069\u0063\u0020\u0076\u006F\u0069\u0064\u0020\u006D\u0061\u0069\u006E\u0028\u0053\u0074\u0072\u0069\u006E\u0067\u005B\u005D\u0020\u0061\u0029\u007B\u0053\u0079\u0073\u0074\u0065\u006D\u002E\u006F\u0075\u0074\u002E\u0070\u0072\u0069\u006E\u0074\u006C\u006E\u0028\u0022\u0054\u0068\u0065\u0020\u0071\u0075\u0069\u0063\u006B\u0020\u0062\u0072\u006F\u0077\u006E\u0020\u0066\u006F\u0078\u0020\u006A\u0075\u006D\u0070\u0073\u0020\u006F\u0076\u0065\u0072\u0020\u0074\u0068\u0065\u0020\u006C\u0061\u007A\u0079\u0020\u0064\u006F\u0067\u0022\u0029\u003B\u007D\u007D

A Java program can be written in UNC notation... But it remains verbose!

\$\endgroup\$
5
\$\begingroup\$

J, 6 distinct chars

6 distinct char version (u:10 +) using some idea flornquake used. The method is adding vectors of 0 1 11 and 111 together to add up to the desired 84 104 101 32 113 117 ... vector:

   u:11 11 11 11 111 111 11 11 11 11 11 111 111 111 11 11 11 111 111 11 11 111 11 111 111 11 111 111 11 111 11 111 11 11 11 11 11 111 111 11 11 111 11 + 11 11 11 11   1   1 11 11 11 11 11   1   0   1 11 11 11   0   1 11 11   1 11   1   1 11   0   1 11   1 11   1 11 11 11 11 11  11   1 11 11   0 11 + 11 11 11  1   1   1 11 11 11  1 11   1   0   1 11  1 11   0   1  1 11   1 11   0   1  1   0   1 11   1  1   1 11 11  1 11 11   0   1  1 11   0 11 + 11 11 11  1   0   1 11 11 11  1 11   1   0   1 11  1 11   0   1  1 11   1 11   0   1  1   0   1 11   1  1   1 11 11  1 11 11   0   1  1 11   0 11 + 11 11 11  1   0   1 11 11 11  1 11   0   0   1 11  1 11   0   1  1 11   1 11   0   1  1   0   1 11   0  1   1 11 11  1 11 11   0   1  1 11   0 11 + 11 11 11  1   0   1 11 11 11  1 11   0   0   1 11  1 11   0   1  1 11   1 11   0   0  1   0   1 11   0  1   1 11 11  1 11 11   0   1  1 11   0 11 + 11 11 11  1   0   1 11 11 11  1 11   0   0   1 11  1 11   0   1  1 11   1 11   0   0  1   0   1 11   0  1   0 11 11  1 11 11   0   1  1 11   0 11 +  1 11 11  1   0   0 11 11 11  1 11   0   0   1 11  1 11   0   1  1 11   0 11   0   0  1   0   1 11   0  1   0 11 11  1 11 11   0   1  1 11   0 11 +  1 11 11  1   0   0 11 11 11  1  1   0   0   1 11  1 11   0   1  1 11   0 11   0   0  1   0   0 11   0  1   0 11 11  1 11  1   0   1  1 11   0 11 +  1  1  1  1   0   0  1  0  1  1  1   0   0   0 11  1  1   0   1  1  1   0  1   0   0  1   0   0  1   0  1   0  1  1  1  1  1   0   1  1  1   0  1 +  1  1  1  1   0   0  1  0  1  1  1   0   0   0  0  1  1   0   0  1  1   0  1   0   0  1   0   0  1   0  1   0  1  1  1  1  1   0   1  1  0   0  1 +  1  1  0  1   0   0  1  0  1  1  1   0   0   0  0  1  1   0   0  1  1   0  1   0   0  1   0   0  0   0  1   0  1  0  1  1  1   0   0  1  0   0  1 +  1  1  0  0   0   0  1  0  1  0  1   0   0   0  0  0  0   0   0  0  1   0  1   0   0  0   0   0  0   0  0   0  1  0  0  1  1   0   0  0  0   0  1 +  1  1  0  0   0   0  1  0  1  0  1   0   0   0  0  0  0   0   0  0  1   0  1   0   0  0   0   0  0   0  0   0  1  0  0  1  1   0   0  0  0   0  0 +  0  0  0  0   0   0  1  0  1  0  1   0   0   0  0  0  0   0   0  0  1   0  1   0   0  0   0   0  0   0  0   0  0  0  0  1  1   0   0  0  0   0  0 +  0  0  0  0   0   0  0  0  1  0  1   0   0   0  0  0  0   0   0  0  1   0  1   0   0  0   0   0  0   0  0   0  0  0  0  1  1   0   0  0  0   0  0 +  0  0  0  0   0   0  0  0  1  0  1   0   0   0  0  0  0   0   0  0  0   0  1   0   0  0   0   0  0   0  0   0  0  0  0  1  1   0   0  0  0   0  0 +  0  0  0  0   0   0  0  0  0  0  1   0   0   0  0  0  0   0   0  0  0   0  1   0   0  0   0   0  0   0  0   0  0  0  0  1  0   0   0  0  0   0  0 +  0  0  0  0   0   0  0  0  0  0  0   0   0   0  0  0  0   0   0  0  0   0  1   0   0  0   0   0  0   0  0   0  0  0  0  0  0   0   0  0  0   0  0
The quick brown fox jumps over the lazy dog

Edit: 1+:1 is 0 so maybe there is a 5 char solution here... (Also +: as double could be used to shorten the solution.)

13 distinct char version:

   u: 84 104 101 32 113 117 105 99 107 32 98 114 111 119 110 32 102 111 120 32 106 117 109 112 115 32 111 118 101 114 32 116 104 101 32 108 97 122 121 32 100 111 103
The quick brown fox jumps over the lazy dog

Anonymous user's (DirkL) improvement: shorter solution but still using 6 characters (u:23 |) is possible. Using | as residue operator for decimals e.g. 223 | 2333333 = 84.

   u:223|2333333 232333323 3223 32 23223333 23222222 323232 322 32333323 32 322333 232333333 3233 2323333 3232 32 2332 3233 32232 32 323233 23222222 2323323 23223332 3223333322 32 3233 2323332 3223 232333333 32 32333332 232333323 3223 32 2323322 322332 32332223 32233 32 323 3233 2333
The quick brown fox jumps over the lazy dog
\$\endgroup\$
  • \$\begingroup\$ You should combine the 7 char solution with randomra's suggestion to use 111 and 11 where possible. \$\endgroup\$ – Fraxtil Apr 17 '13 at 5:45
  • \$\begingroup\$ @Fraxtil I'm randomra. :) I did it now. I could also use 10 100 and 101 now, but I will skip that. \$\endgroup\$ – randomra Apr 17 '13 at 10:28
  • \$\begingroup\$ Haha, whoops. Good job nonetheless. \$\endgroup\$ – Fraxtil Apr 17 '13 at 22:50
5
\$\begingroup\$

Befunge-98, 3 distinct characters

 "++++++++,,,,,,,,,,,,,,,,,,,,,,,,,,,,,"++++++++++++++++++++++++++++++++++++,",,,,,,,,,,,,,,"+++++++++++++,"+++,,,,,,,,,,,"+++++++++++++,",,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++,"+++++++,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++,"+++,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++,"+++++++,,,,,,,,,,,,,"+++++++++++++++++++,"+++++,,,,,,,,,"+++++++++++++,"+++++,,,,,,,,,,,,,,,"+++++++++++++++++++,",,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++,"++++++,,,,,,,,"+++++++++++++,"++++++,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++,"+,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++,"+,,,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++,"++,,,,,,,,,,,,,,,,,,"+++++++++++++++++++,",,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++,"++,,,,,,,,,,,,"+++++++++++++,"+,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++,",,,,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++,",,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++,"++++++,,,,,,,,,,,,,,"+++++++++++++++++++,"+++,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++,"+++,,,,,,,,,,,,,,,,,"+++++++++++++++++++,",,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++,"+++++,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++,",,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++,"+,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++,"++,,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++,"+++,,,,,,,,,,,"+++++++++++++,"++++++,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++,",,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++,"++++,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++,",,,,,,,,,,,,,,"+++++++++++++,"+++,,,,,,,,,,,"+++++++++++++,",,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++,"++++,,,,,,,,,,,,,,,,"+++++++++++++++++++,"+++++++,,,,,,,"+++++++++++++,"++++++,,,,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++++++++,"+++++++,,,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++++++++++,",,,,,,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++++++,"++++,,,,,,,,,,"+++++++++++++,"+,,,,,,,,,,,,,,,,,,,"+++++++++++++++++++,"+,,,,,,,,,,,,,"+++++++++++++,"+++,,,,,,,,,"+++++++++++,

Using this Befunge-98 interpreter. At first, I joined the 4-character competition with an @ at the end to terminate . This program repeatedly outputs The quick brown fox jumps over the lazy dog\r, where the terminating \r deletes the previous sentence. Therefore, the sentence is written once.


Befunge-98, 4 distinct characters (1047 characters in total)

"@@@,,,,,,,,,,,,,,,"+++++++++++++++++,",,,,,,,,,,,,,,"+++++++++++++,"+++,,,,,,,,,,,"+++++++++++++,"@@@,,,,,,,,"++++++++++,"@+++,,,,"+++++++,"@@@+++,,,,,,,"++++++++++++,"@@+++,,,,,,,,,,,,,,"++++++++++++++++++,"@@+,,,,,,,,,,"++++++++++++,"@+"+,"@@@,,,,,,,,"++++++++++,"@@++,,,,,,,,,"++++++++++++,"@++,,,,,"+++++++,"@@@+,,,"++++++,"@@@+,,,,,,,,,"++++++++++++,"@@@++,,"++++++,"@@@,,,,,,,,"++++++++++,"++,,,,,,,,,,,,"+++++++++++++,"@@@+,,,"++++++,"@@@,,,,,,,,,,"++++++++++++,"@@@,,,,,,,,"++++++++++,"@@++,,,,,,,,,,,,,,,"++++++++++++++++++,"@@@+++,,,,,,,"++++++++++++,"@@@+++,"++++++,"@@@,,,,"++++++,"@+,,,,,,"+++++++,"@@@,,,,,,,,"++++++++++,"@@@+,,,"++++++,"@@@++,,,,,,,,"++++++++++++,"+++,,,,,,,,,,,"+++++++++++++,"@++,,,,,"+++++++,"@@@,,,,,,,,"++++++++++,"@,,,,,,,"+++++++,",,,,,,,,,,,,,,"+++++++++++++,"+++,,,,,,,,,,,"+++++++++++++,"@@@,,,,,,,,"++++++++++,"@,"+,"@@+++,,,,,,,,"++++++++++++,"@++,,,,,,,,,,,"+++++++++++++,"@+++,,,,,,,,,,"+++++++++++++,"@@@,,,,,,,,"++++++++++,"@@,,,,,,,,,,,"++++++++++++,"@@@+,,,"++++++,"+,,,,,,,,,,,,,"+++++++++++++,@

The less cheaty version. This one terminates normally.

\$\endgroup\$
  • \$\begingroup\$ @dan1111 The source doesn't contain a line break, let me clarify that \$\endgroup\$ – copy Apr 19 '13 at 12:03
4
\$\begingroup\$

JavaScript (in Chrome Console) 17

I had the same idea as flornquake but he beat me too it. So I went for the ugly way to do this!

[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+"q"+[constructor+[]][+![]][+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]]+"k"+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][+![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]]+"x"+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+"z"+"y"+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]]+[constructor+[]][+![]][!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]
\$\endgroup\$
  • 6
    \$\begingroup\$ Phe quick bro n fox undefinedumps over the lazy dog? \$\endgroup\$ – Grimace of Despair Apr 17 '13 at 9:35
  • 2
    \$\begingroup\$ Ah, I guess what you get for constructor+[] is different to what I get. Different chrome versions I assume. Told you it was ugly \$\endgroup\$ – Griffin Apr 17 '13 at 12:02
  • 1
    \$\begingroup\$ Putting it in Firebug's console on Firefox is minorly amusing - only "quick" and "fox" came out correctly. Guess that works given the browser's name ;) \$\endgroup\$ – Izkata Apr 17 '13 at 14:33
4
\$\begingroup\$

C, 15 distinct chars

Some inspiration from Fors's answer (which I beat by a character) and ecatmur's comment to that answer.
Spaces and newlines are only for clarity, and are not counted.

How it works?
1. Each group of 3 characters is represented in a number. A pointer to this number, treated as a character pointer, is a pointer to a string of these 3 characters, plus a terminating null. Assumes little-endian.
2. The function a helps get the address of a literal number, without defining a variable.

a(i){if(printf(&i)){}}
main(){
    if(a(1111111+1111111+1111111+1111111+1111111+111111+111111+111111+111111+111111+111111+111111+111111+111111+11111+11111+11111+11111+11111+11111+11111+11111+1111+111+111+11+11+11+11+11+11+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+111111+111111+111111+111111+111111+111111+111111+11111+11111+1111+1111+1111+1111+1111+1111+1111+1+1+1+1+1+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+111111+11111+11111+11111+1111+1111+1111+1111+11+11+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+111111+111111+111111+111111+111111+11111+11111+11111+11111+1111+1111+1111+1111+1111+1111+111+111+111+111+111+111+1+1+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+111111+111111+111111+11111+1111+1111+1111+1111+1111+111+111+111+111+111+11+11+11+11+11+11+11+11+1+1+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+111111+111111+111111+11111+11111+11111+11111+11111+11111+11111+111+111+111+111+111+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+11111+11111+11111+11111+11111+1111+1111+1111+1111+1111+1111+1111+1111+1111+111+111+111+111+111+111+11+1+1+1+1+1+1+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+111111+111111+111111+111111+11111+11111+11111+1111+111+111+11+11+11+11+11)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+111111+111111+111111+11111+11111+11111+11111+11111+1111+1111+1111+1111+111+111+111+111+111+11+11+1+1+1+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+111111+111111+111111+111111+111111+11111+11111+11111+11111+1111+1111+1111+1111+1111+1111+1111+111+111+111+11+11+11+11+11+11+11+1+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+11111+11111+11111+11111+11111+11111+111+111+111+111+111+111+111+111+111+11+11+1+1+1+1+1+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+111111+11111+11111+11111+11111+11111+11111+11111+1111+1111+1111+1111+1111+1111+1111+111+111+111+111+111+11+11+11+11+11+11+1+1+1+1+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+1111111+111111+11111+11111+11111+11111+11111+11111+1111+1111+1111+1111+1111+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)){}
    if(a(1111111+1111111+1111111+1111111+1111111+1111111+111111+111111+111111+111111+111111+11111+11111+11111+11111+11111+11111+11111+111+11+1+1+1+1+1+1+1+1)){}
    if(a(1111+1111+111+111+111+11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)){}
}
\$\endgroup\$
  • \$\begingroup\$ Nice! Unfortunately it prints "The quick brown fox jumps over thazy dog" for me using Clang/GCC/ICC under Mac OS X. And under Linux (a virtual machine with Arch) it prints the correct string using GCC and the thazy string using Clang. As Clang is generally more correct and standards compliant, there seems to be something odd going on. \$\endgroup\$ – Fors Apr 19 '13 at 5:21
  • \$\begingroup\$ It also prints the thazy string using GCC with optimizations under Linux. \$\endgroup\$ – Fors Apr 19 '13 at 5:28
  • 1
    \$\begingroup\$ @fors, Fixed. It was a missing {} in one of the lines, which made it sensitive to a's return value. \$\endgroup\$ – ugoren Apr 19 '13 at 11:50
3
\$\begingroup\$

vba (16 8 distinct characters)

(using ideas from matatwork and AutomatedChaos)

?Chr(11+11+11+11+11+11+11+1+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+11+1+1)Chr(11+11+1+1+1+1+1+1+1+1+1+1)Chr(111+1+1)Chr(111+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+11)Chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1)Chr(11+11+1+1+1+1+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)Chr(111+1+1+1)Chr(111)Chr(111+1+1+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+11+11)Chr(11+11+1+1+1+1+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+11+1+1+1)Chr(111)Chr(111+1+1+1+1+1+1+1+1+1)Chr(11+11+1+1+1+1+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1)Chr(111+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)Chr(111+1)Chr(111+1+1+1+1)Chr(11+11+1+1+1+1+1+1+1+1+1+1)Chr(111)Chr(111+1+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+11+1+1)Chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)Chr(111+11)Chr(111+1+1+1+1+1+1+1+1+1+1)Chr(11+11+1+1+1+1+1+1+1+1+1+1)Chr(11+11+11+11+11+11+11+11+11+1)Chr(111)Chr(11+11+11+11+11+11+11+11+11+1+1+1+1)

note that if you want to put this in, you would have to break the line into 2, as it's too long for the VBA editor

Code: 40 '(' Count: 37
Code: 41 ')' Count: 37
Code: 43 '+' Count: 331
Code: 49 '1' Count: 552
Code: 63 '?' Count: 1
Code: 67 'C' Count: 37
Code: 104 'h' Count: 37
Code: 114 'r' Count: 37
-----TOTAL CHARACTERS: 1069

\$\endgroup\$
  • \$\begingroup\$ Why using string parameters for Chr()? Seems to work fine without: ?Chr(&0124);Chr(&0150);Chr(&0145);…. \$\endgroup\$ – manatwork Apr 17 '13 at 14:24
  • \$\begingroup\$ @manatwork, fixed, thank you \$\endgroup\$ – SeanC Apr 17 '13 at 14:56
  • 1
    \$\begingroup\$ Following your method, you could do it in 8 distinct characters: ?chr(1+), it will be something like ?chr(11+11+11+11+11+11+11+1+1+1+1+1+1+1)+chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1)+ .... etc. \$\endgroup\$ – AutomatedChaos Apr 19 '13 at 6:22
  • \$\begingroup\$ Tested some more in VBA 7.1 (the one that comes with Office 2013) and there is no need for the semicolons either: ?Chr(&0124)Chr(&0150)Chr(&0145)…. \$\endgroup\$ – manatwork Apr 20 '13 at 8:20
2
\$\begingroup\$

C: 16 distinct characters

main(a){putchar(a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a);putchar(a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a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+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a);putchar(a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a);putchar(a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a);putchar(a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a);putchar(a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a);putchar(a+a+a+a+a+a+a+a+a+a);}
\$\endgroup\$
  • \$\begingroup\$ Variation with the same length - if(putchar(...)+putchar(...)){} removes ; but adds f (but relies on the unspecified evaluation order). \$\endgroup\$ – ugoren Apr 17 '13 at 9:34
  • \$\begingroup\$ @ugoren you can fix the evaluation order with if(putchar(...)){}if(putchar(...)){} etc. \$\endgroup\$ – ecatmur Apr 17 '13 at 13:19
  • \$\begingroup\$ @ecatmur, indeed works. Also if(putchar(...))if(putchar(...)){} or if(putchar(putchar(...)+...){}, but still this approach doesn't save a character. \$\endgroup\$ – ugoren Apr 18 '13 at 6:07
2
\$\begingroup\$

Postscript (19 distinct characters)

<54686520717569636b2062726f776e20666f78206a756d7073206f76657220746865206c617a7920646f67>=

Uses the hexadecimal digits 0-9, a-f, hex-string delimiters < >, and = to print.

(13 distinct characters)

( )dup 0 2#1010100 put dup print dup 0
2#1101000 put dup print dup 0
2#1100101 put dup print dup 0
2#100000 put dup print dup 0
2#1110001 put dup print dup 0
2#1110101 put dup print dup 0
2#1101001 put dup print dup 0
2#1100011 put dup print dup 0
2#1101011 put dup print dup 0
2#100000 put dup print dup 0
2#1100010 put dup print dup 0
2#1110010 put dup print dup 0
2#1101111 put dup print dup 0
2#1110111 put dup print dup 0
2#1101110 put dup print dup 0
2#100000 put dup print dup 0
2#1100110 put dup print dup 0
2#1101111 put dup print dup 0
2#1111000 put dup print dup 0
2#100000 put dup print dup 0
2#1101010 put dup print dup 0
2#1110101 put dup print dup 0
2#1101101 put dup print dup 0
2#1110000 put dup print dup 0
2#1110011 put dup print dup 0
2#100000 put dup print dup 0
2#1101111 put dup print dup 0
2#1110110 put dup print dup 0
2#1100101 put dup print dup 0
2#1110010 put dup print dup 0
2#100000 put dup print dup 0
2#1110100 put dup print dup 0
2#1101000 put dup print dup 0
2#1100101 put dup print dup 0
2#100000 put dup print dup 0
2#1101100 put dup print dup 0
2#1100001 put dup print dup 0
2#1111010 put dup print dup 0
2#1111001 put dup print dup 0
2#100000 put dup print dup 0
2#1100100 put dup print dup 0
2#1101111 put dup print dup 0
2#1100111 put dup print dup 0

%   1 2 3 4 5 6 7 8 9 0 1 2 3
%   0 1 2 # d i u n p r t ( )

Binary radix numbers get the data in 4 chars (0,1,2,#), but it needs an empty string ( ) and some letters (put, dup (-up), print (-pt)) to insert the binary number in there.

\$\endgroup\$
2
\$\begingroup\$

APL 8

The following command converts a character string to its binary equivalent:

s←11 ⎕dr "The quick brown fox jumps over the lazy dog"

If we assign the resulting binary to the vector s to avoid having to display all the zeros and ones then we can print the result by reversing the process by applying:

82 ⎕dr s

"The quick brown fox jumps over the lazy dog"

So the 8 unique characters are 8,2,⎕,d,r,space and the 0 and 1 in the binary vector s.

\$\endgroup\$
2
\$\begingroup\$

k

12 distinct characters

1'10h$2/:'(01010100b;01101000b;01100101b;00100000b;01110001b;01110101b;01101001b;01100011b;01101011b;00100000b;01100010b;01110010b;01101111b;01110111b;01101110b;00100000b;01100110b;01101111b;01111000b;00100000b;01101010b;01110101b;01101101b;01110000b;01110011b;00100000b;01101111b;01110110b;01100101b;01110010b;00100000b;01110100b;01101000b;01100101b;00100000b;01101100b;01100001b;01111010b;01111001b;00100000b;01100100b;01101111b;01100111b);

The characters are 10h$2/:'(b;)

\$\endgroup\$
2
\$\begingroup\$

PHP. 10 distinct characters.

e, c, h, o, r, (, 1, +, ), ; (Line breaks can be removed.)

echo(chr(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1));
echo(chr(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1));
echo(chr(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+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1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1));
echo(chr(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1));
echo(chr(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1));
echo(chr(111));
echo(chr(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1));
\$\endgroup\$
  • \$\begingroup\$ You forgot to count 'r', so I count 11 distinct characters. \$\endgroup\$ – Zombaya Apr 17 '13 at 21:41
  • 4
    \$\begingroup\$ And I think you could lose the space by using echo(chr(1+1+1+...));, so you go back to 10 characters again. \$\endgroup\$ – Zombaya Apr 17 '13 at 21:48
1
\$\begingroup\$

Bash: 18 16 distinct characters

printf `printf \\\\\\\\x%x $[11+11+11+11+11+11+11+1+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1+1] $[11+11+1+1+1+1+1+1+1+1+1+1] $[111+1+1] $[111+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11] $[11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1] $[11+11+1+1+1+1+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1] $[111+1+1+1] $[111] $[111+1+1+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+11] $[11+11+1+1+1+1+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1+1+1] $[111] $[111+1+1+1+1+1+1+1+1+1] $[11+11+1+1+1+1+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1] $[111+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1] $[111+1] $[111+1+1+1+1] $[11+11+1+1+1+1+1+1+1+1+1+1] $[111] $[111+1+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1+1] $[111+1+1+1] $[11+11+1+1+1+1+1+1+1+1+1+1] $[111+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1+1] $[11+11+1+1+1+1+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1] $[111+11] $[111+1+1+1+1+1+1+1+1+1+1] $[11+11+1+1+1+1+1+1+1+1+1+1] $[11+11+11+11+11+11+11+11+11+1] $[111] $[11+11+11+11+11+11+11+11+11+1+1+1+1]`

Sample run:

bash-4.2$ bash distinctchar.sh 
The quick brown fox jumps over the lazy dog

Counting:

bash-4.2$ sed 's/./&\n/g' distinctchar.sh | sort -u | wc -l
16

bash-4.2$ sed 's/./&\n/g' distinctchar.sh | sort | uniq -c
      2 `
     45  
     43 [
     43 ]
     43 $
      8 \
      1 %
    384 +
    637 1
      2 f
      2 i
      2 n
      2 p
      2 r
      2 t
      2 x
\$\endgroup\$
  • \$\begingroup\$ It's probably bending the rules, but cat is only a 3 character solution. The catch is that you need to pipe "The quick brown fox jumps over the lazy dog" into it. \$\endgroup\$ – Mr. Llama May 15 '13 at 19:36
  • \$\begingroup\$ @GigaWatt, interesting. But what will convert the character codes into characters? \$\endgroup\$ – manatwork May 16 '13 at 6:56
1
\$\begingroup\$

K, 9

1@10h$(1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1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+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1);

1 @ 0 h $ ( + ; )

\$\endgroup\$
1
\$\begingroup\$

Perl, 10 chars

Basically a rip-off of flornquake's Python solution.

Using substitution with ee is a cheaper way to get eval. Unfortunately, Perl uses . for concatenation, which adds a character.

I was hoping to eliminate parentheses (which are optional for functions in Perl), using a syntax like this:

s ss char 111+1 ... see 

(Yes, s is a valid regex delimiter). However, I couldn't get that to work because the precedence of . is too high, trying to concatenate before it calls the function.

s()(chr(111+1).chr(111+1+1+1).chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1).chr(
11+11+11+11+11+11+11+11+11+11).chr(111+1+1+1+1+1).chr(11+11+11+1).chr(11+11+11+
11+11+11+11+1+1+1+1+1+1+1).chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1).chr(11+11+
11+11+11+11+11+11+11+1+1).chr(11+11+1+1+1+1+1+1+1+1+1+1).chr(111+1+1).chr(111+1
+1+1+1+1+1).chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1).chr(11+11+11+11+11+11+
11+11+11).chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1).chr(11+11+1+1+1+1+1+1
+1+1+1+1).chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1).chr(111+1+1+1).chr(
111).chr(111+1+1+1+1+1+1+1+1).chr(11+11+11+11+11+11+11+11+11+11).chr(11+11+1+1+
1+1+1+1+1+1+1+1).chr(11+11+11+11+11+11+11+11+11+1+1+1).chr(111).chr(111+1+1+1+1
+1+1+1+1+1).chr(11+11+1+1+1+1+1+1+1+1+1+1).chr(11+11+11+11+11+11+11+11+11+1+1+1
+1+1+1+1).chr(111+1+1+1+1+1+1).chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1
+1).chr(111+1).chr(111+1+1+1+1).chr(11+11+1+1+1+1+1+1+1+1+1+1).chr(111).chr(111
+1+1+1+1+1+1+1).chr(11+11+11+11+11+11+11+11+11+1+1).chr(111+1+1+1).chr(11+11+1+
1+1+1+1+1+1+1+1+1).chr(111+1+1+1+1+1).chr(11+11+11+11+11+11+11+11+11+1+1+1+1+1)
.chr(11+11+11+11+11+11+11+11+11+1+1).chr(11+11+1+1+1+1+1+1+1+1+1+1).chr(11+11+
11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1).chr(11+11+11+11+11+11+11+11+1+1+1+1+1+1
+1+1+1).chr(111+11).chr(111+1+1+1+1+1+1+1+1+1+1).chr(11+11+1+1+1+1+1+1+1+1+1+1)
.chr(11+11+11+11+11+11+11+11+11+1).chr(111).chr(11+11+11+11+11+11+11+11+11+1+
1+1+1).chr(11+11+11+1))ee
\$\endgroup\$
1
\$\begingroup\$

Erlang 8 distinct characters

Used characters: 012#<>:.

<<2#1010100011010000110010100100000011100010111010101101001011000110110101100100000011000100111001001101111011101110110111000100000011001100110111101111000001000000110101001110101011011010111000001110011001000000110111101110110011001010111001000100000011101000110100001100101001000000110110001100001011110100111100100100000011001000110111101100111:2#101011000>>.
\$\endgroup\$
1
\$\begingroup\$

C (23 distinct characters)

main(){
puts("\124\150\145\040\161\165\151\143\153\040\142\162\157\167\156\040"
"\146\157\170\040\152\165\155\160\163\040\157\166\145\162\040\164"
"\150\145\040\154\141\172\171\040\144\157\147");
}

Note: I didn't include newlines in the distinct character count, but these can easily be removed if needed, at the expense of readability.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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