শেপস্ক্রিপ্ট + সিজাম + গল্ফস্ক্রিপ্ট, 96 95 62 বাইট
'"%r"@%"0?!"'0?!
এটি স্ট্যান্ডার্ড শেপস্ক্রিপ্ট কুইন । এটি অনলাইন চেষ্টা করুন!
সিজেম, 46 বাইট
];{"'\"%r\"@%\"0?!\"'0?!];"SS#~(>
\"0$~"N}0$~
শেষ বাইটটি একটি লাইনফিড। এটি অনলাইন চেষ্টা করুন!
গল্ফস্ক্রিপ্ট, 62 বাইট
'"%r"@%"0?!"'0?!];{"'\"%r\"@%\"0?!\"'0?!];"SS#~(>
\"0$~"N}0$~
শেষ বাইটটি একটি লাইনফিড। এটি ওয়েব গল্ফস্ক্রিপ্টে অনলাইনে চেষ্টা করুন ।
প্রতিপাদন
$ wc -c P Q
16 P
46 Q
62 total
$ cat P Q > P+Q
$
$ shapescript P 2>&- | diff -qs - P
Files - and P are identical
$ cjam P 2>&- | diff -qs - P
Files - and P differ
$ golfscript P 2>&- | diff -qs - P
Files - and P differ
$
$ cjam Q 2>&- | diff -qs - Q
Files - and Q are identical
$ golfscript Q 2>&- | diff -qs - Q
Files - and Q differ
$ shapescript Q 2>&- | diff -qs - Q
Files - and Q differ
$
$ golfscript P+Q 2>&- | diff -qs - P+Q
Files - and P+Q are identical
$ shapescript P+Q 2>&- | diff -qs - P+Q
Files - and P+Q differ
$ cjam P+Q 2>&- | diff -qs - P+Q
Files - and P+Q differ
কিভাবে এটা কাজ করে
ShapeScript
' Push a string that, when evaluated, does the following.
"%r" Push this formatting string. %r gets replaced by a string
representation of the corresponding argument.
@ Swap the string that is being evaluated on top of the stack.
% Apply formatting to the string on top of the stack.
"0?!" Push that string.
'
0?! Push a copy of the previous string and evaluate it.
CJam
]; e# Clear the stack. Stack is already clear. Does nothing.
{ e# Push the following code block:
"'\"%r\"@%\"0?!\"'0?!];"
SS# e# Find the index of " " in " ". Pushes 0.
~( e# Apply logical NOT and decrement. Pushes -2.
> e# Discard all but the two rightmost characters from the string,
e# i.e., reduce it to "];".
\ e# Swap the string "];" with the code block in execution.
"0$~" e# Push that string.
N e# Push a linefeed.
} e#
0$~ e# Push a copy of the code block and execute it.
GolfScript
'"%r"@%"0?!"'
0?! # Find the index of the number 0 in the string and apply logical NOT.
]; # Clear the stack.
{ # Push the following code block:
"'\"%r\"@%\"0?!\"'0?!];"
SS # Undefined token. Does nothing.
#~(> # Comment.
\ # Swap the string with the code block in execution.
"0$~" # Push that string.
N # Undefined token. Does nothing.
} #
0$~ # Push a copy of the code block and execute it.