32
\$\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!

In the event of a tie, the shorter answer will be accepted.

\$\endgroup\$
15
  • \$\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
  • 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
  • 2
    \$\begingroup\$ I’m voting to close this as primarily opinion-based due to “similar languages (at my discretion) are disallowed” \$\endgroup\$ – ChartZ Belatedly Feb 3 at 21:17
  • 1
    \$\begingroup\$ That's a fair assessment. I've replaced that parenthetical with a well-defined constraint that exactly matches the answers deemed acceptable. \$\endgroup\$ – ashastral Feb 6 at 3:53
  • 2
    \$\begingroup\$ Related: Hello ASCII World \$\endgroup\$ – roblogic Feb 6 at 11:22

35 Answers 35

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\$
3
  • 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\$ – ashastral Apr 18 '13 at 1:28
  • \$\begingroup\$ A really short and nice answer is underway. \$\endgroup\$ – Fors Apr 18 '13 at 13:59
  • \$\begingroup\$ Replacing spaces with /s in your earlier answer can get you down to three unique characters (although with warning/error messages) \$\endgroup\$ – user41805 Feb 6 at 8:01
24
\$\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\$
21
\$\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\$
13
  • 8
    \$\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
  • 1
    \$\begingroup\$ @dan1111, it was meant to be a stretch. :) But it would not be very difficult to write this directly, using nothing but Intel documentation. \$\endgroup\$ – Fors Apr 17 '13 at 12:40
  • 21
    \$\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\$ – ashastral Apr 17 '13 at 22:48
15
\$\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\$
6
  • \$\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
  • 13
    \$\begingroup\$ Using 11 and 111 too makes it shorter and elegant elegant. \$\endgroup\$ – randomra Apr 17 '13 at 0:24
  • 5
    \$\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
  • 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\$
1
  • \$\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\$ – ashastral 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\$
6
\$\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\$
3
  • \$\begingroup\$ You should combine the 7 char solution with randomra's suggestion to use 111 and 11 where possible. \$\endgroup\$ – ashastral 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\$ – ashastral Apr 17 '13 at 22:50
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\$
0
5
+200
\$\begingroup\$

dc (GNU), 2 distinct characters (z, P), 134660653084537 bytes

The behavior of P on number is a GNU extension.

(can't post code)

Anyway, this is the generator program: Try it online!

You can verify manually that for some smaller text (such as abca) it produces the correct output. It will only actually try to construct the program if the resulting program size does not exceed \$2^{16}\$ (configurable in the program)

Assuming that the actual dc implementation doesn't have any problem with having about that many numbers on the stack.

I came up with the idea when someone mentioned in chat that it's possible to solve the challenge with 2 distinct bytes.


Explanation:

To print out the string in dc, obviously a character printing command is required (I use P), and something to push to the stack is required.

As far as I can see, the only commands that push something to the stack while the stack is empty are 0-9A-F (pushes the corresponding digit/sequence of number interpreted in base 10), . (pushes 0.0 = 0), _ (pushes -0 = 0) I/ll/O/K (pushes 0/0/10/10 by default), z (push the number of values currently in the stack). Of those only z have the potential to produce any values.

Therefore, with only z and P, at any time the stack is [0, 1, 2, ..., n], and P will print the value corresponding to n and pop n.

the integer portion of its absolute value is printed out as a "base (UCHAR_MAX+1)" byte stream

So the program \$\text{‘z'}^{a_1} + \text{‘P'} + \text{‘z'}^{a_2} + \text{‘P'} + \text{‘z'}^{a_3} + \ldots + \text{‘P'} + \text{‘z'}^{a_n} + \text{‘P'}\$ will call P on \$a_1-1, a_1+a_2-2, \ldots, (a_1+\ldots+a_n-n)\$.

\$\endgroup\$
2
  • \$\begingroup\$ Since the code is 122Tb, you'd need to store it in multiple 16Tb files. Then the OS has to give to dc probably 122Tb*2 (code, stack) memory from RAM and swap. Nobody knows how dc and the OS will behave under these extreme conditions. But I like the idea behind the algorithm, +1, assuming the Python generator is bug free. \$\endgroup\$ – seshoumara Feb 6 at 17:05
  • \$\begingroup\$ Note the characters A-F also push their values (10-15) onto the stack \$\endgroup\$ – user41805 Feb 6 at 17:44
5
\$\begingroup\$

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

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

If non-terminating answers are allowed, then this can be done in 3 distinct characters:

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

Uses 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.

\$\endgroup\$
3
  • \$\begingroup\$ @dan1111 The source doesn't contain a line break, let me clarify that \$\endgroup\$ – copy Apr 19 '13 at 12:03
  • 1
    \$\begingroup\$ Answers are required to terminate, so the first solution is invalid even ignoring IO gimmicks. \$\endgroup\$ – pppery Feb 6 at 19:19
  • \$\begingroup\$ You may want to either delete the first part or move it after the other section, as pppery mentions, it is invalid. You may actually be able to get it to three distinct characters by using - instead of +. \$\endgroup\$ – Jo King Feb 9 at 7:51
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\$
4
  • 7
    \$\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
  • \$\begingroup\$ @Izkata Seems to be the same for Edge. \$\endgroup\$ – Makonede Feb 3 at 21:08
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\$
3
  • \$\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\$
4
  • \$\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
3
\$\begingroup\$

Jelly, 3 distinct bytes

‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ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‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ0‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘‘Ọ

Try it online!

\$\endgroup\$
3
\$\begingroup\$

dc, 3 distinct characters (1ZP), 4143 3707 bytes

A trivial dc solution is to use as many 1s as the ASCII code of a character (except for 'o'), then to print the size of the (unary) number with P. No arithmetic necessary!

111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP111P11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111ZP111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP111P111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111ZP1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111ZP111P1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111ZP111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP11111111111111111111111111111111ZP1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP111P1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111ZP

Try it online!

I used the following bash code, not golfed, to generate the above dc script:

echo "The quick brown fox jumps over the lazy dog"|fold -1|while IFS= read -r c;do
  [ "$c" = "o" ] && echo 111P || yes 1|sed "$(echo -n "$c"|od -An -tuC)"q|paste -sd ''|sed 's:$:ZP:'
done|paste -sd ''
\$\endgroup\$
2
  • \$\begingroup\$ These were the three bytes I too had. Since the tiebreaker for two solutions with the same number of unique chars is the bytecount (for both the challenge itself as well as the bounty), you can still shorten your solution. \$\endgroup\$ – user41805 Feb 6 at 11:38
  • \$\begingroup\$ @user41805 I just found a shorter version, by dealing with the letter 'o' directly as 111P. I'll continue to look for improvements to a 3 char dc solution. \$\endgroup\$ – seshoumara Feb 6 at 16:27
3
\$\begingroup\$

naz -u, 3 distinct characters

I've been waiting for a chance to do this.

It turns out that JavaScript's String.fromCharCode(), which the naz interpreter uses internally for output, will truncate any values passed to it to their four least significant digits in hexadecimal — so passing a value of \$41_{16}\$ (\$65_{10}\$) will return A, but so will passing \$10041_{16}\$ (\$65601_{10}\$). The upper \$1\$ is ignored.

This essentially means given a function \$f(x)\$ which returns String.fromCharCode(x),

$$ \forall x \in \mathbb{Z}_{0}^{+}: f(x) = f(x \bmod 65536) $$

making it possible to write a naz program to output any string using only the characters 1, a, and o, as long as the -u command line flag (which removes naz's default integer limits) is used.

The code to output The quick brown fox jumps over the lazy dog via this method, which I've now stored in naz's GitHub repository (right-click > "Save linked content as" will work best), is over 5,500,000 bytes in size and finished running in just over 60 minutes on my machine. You probably shouldn't run this if you need to do other things with your terminal.

The best score that can be achieved without the -u flag is 4 distinct characters (1, a, s, and o.)

\$\endgroup\$
3
\$\begingroup\$

dc (GNU), 3 distinct characters (z|P), 453 bytes

Generator program: Try it online!

Because there can be a lot of possible different states of the stack, this solution prunes the states to be considered (only the topmost 2 can have value different from the default value pushed by z); therefore the result might not be optimal. (after thinking about it for a while, turns out that finding a good solution is terribly hard)

Analysis

There are some options of using a digit, an arithmetic operator and P.

Possible cases for the arithmetic operator are:

  • +: 1065 bytes. (proven to be optimal) Throws a lot of errors. Generator program: Try it online!
  • v: 7617 bytes. (proven to be optimal) you can get it from the generator program above by removing the solve(bestReprAdd), line in the generator)
  • -: will probably result in the approximately-same or slightly-shorter program.
  • %: obviously impossible. (because, for example, 11111 mod 111 is 11, so the constructible values are those already constructible with a literal or 0)
  • ~: (unfortunately) also impossible because there's no way to discard the remainder without printing it out.
  • / and |: should be possible. Analysis pending.
  • * and ^: probably impossible, because there can only be a small set of representable numbers.
  • i: An interesting possibility (11i to increase the input base, 1i to set the input base to 1); however the input base must be between 2 and 16, so there's no way to decrease the input base, so it's not very likely to work.

Other alternatives:

  • z, P, (arithmetic operator): Terribly hard to analyze. Using zP| results in the solution above.

    Some specific cases:

    • +, -: Should be possible. Analysis pending.
    • v and ~: This can only decrease the value on the top of the stack without reducing the stack depth, so I think it's impossible.
    • %: Equivalent to o in this particular case, because x%(x+1)==x.
    • /: Obviously impossible because x/(x+1)==0 and x/0 raises an error.
    • |: Possible. (this also decrease the stack depth by 2 each time instead of 1) Used in this answer.
    • * and ^: Because there can only a limited number of possible results, I'm not very sure this is useful.

    Note that "impossible" means "impossible to do efficiently", because zP alone is sufficient.

  • z, P, o (since the output radix is not used, it's the same as pop the stack and do nothing in this challenge): 1601 bytes (obviously optimal).

\$\endgroup\$
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+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+a+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);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+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);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\$
3
  • \$\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+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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));
\$\endgroup\$
2
  • \$\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\$
2
  • \$\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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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+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1;1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+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\$
0
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\$
1
\$\begingroup\$

PowerShell, 10 distinct characters

[char](11+11+11+11+11+11+11+1+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1+1)+[char](11+11+1+1+1+1+1+1+1+1+1+1)+[char](111+1+1)+[char](111+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11)+[char](11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1)+[char](11+11+1+1+1+1+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)+[char](111+1+1+1)+[char](111)+[char](111+1+1+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+11)+[char](11+11+1+1+1+1+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1+1+1)+[char](111)+[char](111+1+1+1+1+1+1+1+1+1)+[char](11+11+1+1+1+1+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1)+[char](111+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1+1)+[char](111+1)+[char](111+1+1+1+1)+[char](11+11+1+1+1+1+1+1+1+1+1+1)+[char](111)+[char](111+1+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1+1)+[char](111+1+1+1)+[char](11+11+1+1+1+1+1+1+1+1+1+1)+[char](111+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1+1)+[char](11+11+1+1+1+1+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+1+1+1+1+1+1+1+1+1)+[char](111+11)+[char](111+1+1+1+1+1+1+1+1+1+1)+[char](11+11+1+1+1+1+1+1+1+1+1+1)+[char](11+11+11+11+11+11+11+11+11+1)+[char](111)+[char](11+11+11+11+11+11+11+11+11+1+1+1+1)

Try it online!

Fork/Port of the Python 3 answer!

Distinct characters are [char](1+)

\$\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.