Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Draft saved
Draft discarded
Cancel
6
  • 1
    \$\begingroup\$ Related. \$\endgroup\$ Commented Jun 28 at 14:30
  • 1
    \$\begingroup\$ Related: Input ∩ Source Code, Counting characters, \$\endgroup\$ Commented Jun 28 at 18:05
  • 3
    \$\begingroup\$ For many languages (not just Zsh as in @pxeger's answer) an empty program produces empty output, which is falsy whereas non-empty output is truthy; and falsy / truthy is an acceptable output criterion in decision problems. So the empty program will (uninterestingly) fulfill the challenge requirements \$\endgroup\$ Commented Jun 28 at 20:18
  • 4
    \$\begingroup\$ I note that this question is tagged [quine] but does not seem to invoke the rules for quine-related challenges, which prohibit reading the source. Perhaps it should be tagged [self-referential] instead. \$\endgroup\$ Commented Jun 29 at 12:42
  • \$\begingroup\$ Very related / possibly a duplicate (only difference is that this challenge asks for a character as input, and that challenge for a substring 🤷). EDIT: Based on the difference in answers, it seems to be different enough to not warrant a duplicate imo. \$\endgroup\$ Commented Jun 30 at 9:21

AltStyle によって変換されたページ (->オリジナル) /