The challenge is simple: Print the last, middle, and first character of your program's source code, in that order.
The middle character is defined as follows, assuming a source length of n
characters, and 1-indexing:
- If
n
is even, print then/2
-th andn/2 + 1
-th character. (abcdef == cd
) - If
n
is odd, print(n-1)/2 + 1
-th character. (abcde == c
)
Rules
- Given no input, print the last, middle, and first character in your source code, in the form
[last][middle][first]
. This will be 3-4 characters long. - Output must not contain any trailing whitespace. However, if whitespace is a first, middle, or last character, it must be printed as such.
- Source code must be
n >= 3
characters long. - Code must consist of
>= 3
unique characters. - Standard loopholes are forbidden.
- This is code-golf, so shortest solution in characters wins.
Samples
# Form: [code] --> [output]
xyz --> zyx
abcd --> dbca
1 --> # not allowed: too short
abcde --> eca
aaabb --> # not allowed: not enough unique characters
System.out.print("S;pr"); --> ;prS
this is a test --> ts t
123[newline]45 --> 53[newline]1
121
for a great many languages. \$\endgroup\$ – Khuldraeseth na'Barya Jul 9 at 19:32-
for negation and implicitly prints with a linefeed,\n1-
is a three-byter. My search has so far been fruitless. \$\endgroup\$ – Khuldraeseth na'Barya Jul 9 at 19:35