-7
\$\begingroup\$

I'm a Chinese so I use AI to translate this question to English,if there was any grammar mistake,please tell me and I'll fix it.


You need to write a piece of code that, for the specified language, meets the following requirements:It

  1. must run correctly and output itself when executed under the language's compilation instructions;
  2. It must not contain any keywords of that language in a full-word match context (if you are unsure what a full-word match is, please refer to the Evaluation Details section). Both requirements must be satisfied for both C++ and Python. That is to say, this code must be valid C++ and Python code simultaneously, and meet the above requirements.

Under these circumstances, your code should be as concise as possible.

Line breaks are calculated based on CRLF.

\$\endgroup\$
3
  • \$\begingroup\$ Welcome to Code Golf. There is a sandbox that lets you get feedback on a challenge before you post it. \$\endgroup\$ Commented Nov 16 at 16:18
  • 4
    \$\begingroup\$ "please refer to the Evaluation Details section" — where's that? \$\endgroup\$ Commented Nov 16 at 16:18
  • 4
    \$\begingroup\$ Although the answer is already closed, I feel like this is also a duplicate of Write a Polyquine, which asks for a quine that works in any two different programming languages, instead of C++ & Python specifically. \$\endgroup\$ Commented Nov 17 at 8:16

1 Answer 1

0
\$\begingroup\$

my friends have this 250B code:

#define S main(){ch##ar*s
S="#define S main(){ch##ar*s%cS=%c%s%c;1//1;print(end=S%%(10,34,S,34,10,10))%c#define S;__builtin_printf(s,10,34,s,34,10,10);}%cS";1//1;print(end=S%(10,34,S,34,10,10))
#define S;__builtin_printf(s,10,34,s,34,10,10);}
S

If you can do it better,please answer this question.

\$\endgroup\$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.