Print the ends and middle of your code
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 first, middle, and last character in your source code, in the form
[end][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
distinct characters. - Standard loopholes are forbidden.
- This is code-golf, so shortest solution in characters wins.
Samples
# Form: [code] --> [output]
xyz --> zyx
print('p)(') --> )(p
abcd --> dbca
1 --> # not allowed
abcde --> eca
aaabb --> # not allowed
System.out.print("S;pr"); --> ;prS
this is a test --> s tt
123[newline]45 --> 53[newline]1