21
1
- Your program should output exactly:
Hello world!!!
with or without linefeed after. - Your program should take no input.
- Sourcecode character distribution must be correct according to:
- The number of numeric characters (0-9) must be exactly one fibonacci sequence number.
- The number of other non-numeric characters !(0-9) in the sourcecode must be exactly the fibonacci sequence number before the above fibonacci sequence number.
Four examples of valid character distribution in sourcecode:
- 13 numeric, 8 non-numeric characters.
- 34 numeric, 21 non-numeric characters.
- 55 numeric, 34 non-numeric characters.
- 89 numeric, 55 non-numeric characters.
This is code-golf, shortest code in bytes wins! Good luck!
Edit: As this question has constraints on the sourcecode size in combination with being code-golf the accepted answer (if more than one share the equal winning character length) will be the answer with most votes (and least character-count): 2014-03-01.
6Thus, all solutions have a character count which is a fibonacci number. – Howard – 2014-01-18T09:02:16.283
@Howard Indeed. This is a very interesting problem. – cjfaure – 2014-01-18T09:11:04.903
1Here is a program to validate answers (paste the code into the input box.) – Justin – 2014-01-18T09:19:39.577
1Is it even possible to do this in less than 55 characters? The required output has 14 chars, and I can't think of a language that can use numbers to output chars without using at least one character per char. – Justin – 2014-01-18T09:24:56.243
I regret I didn't put a constraint on the distribution for the non-numeric too, separating alpha-characters and symbols. Is it okay to update the rules now this late, rendering your answers invalid? – Plarsen – 2014-01-18T09:35:16.410
2@Plarsen definitely not OK – John Dvorak – 2014-01-18T09:37:27.607
1Okay, I will not change the rules then :) – Plarsen – 2014-01-18T09:38:37.330
@Quincunx: It is possible. – Konrad Borowski – 2014-01-18T10:13:29.010
@xfix it might be, but your solution doesn't achieve that – John Dvorak – 2014-01-18T10:39:29.313
Questions without an objective primary winning criterion are off-topic, as they make it impossible to indisputably decide which entry should win. A codegolf challenge where the code length is forced to be a certain value lack such a criterion. – John Dvorak – 2014-01-18T10:46:54.620
I added a criterion for who will win if more than one answer shares the same character count. – Plarsen – 2014-01-18T10:53:43.510
@Plarsen Why don't you change it and say: "write the smallest program you can" and change [tag:code-golf] to [tag:popularity-contest]? – Justin – 2014-01-18T17:55:55.107
What would have been even more interesting would be to specify that all characters had to be functional - that is, comments and non-essential code could not contribute to the character count. – Iszi – 2014-01-19T06:52:19.213
I agree, @Iszi. I threw answers in, in two languages because padding with comments made it easy. However, while "no comments" could be construed as objective criteria, I think "non-essential code" could be seen as subjective. (It's usually easy to weave some numeric calculation or string manipulation into code which does something and, if cleverly woven, cannot be removed without fundamentally rewriting the answer.) – Darren Stone – 2014-01-20T21:58:18.987