All the quine challenges on this site are focused on byte count, or the characters themselves. This one is different. Your challenge is to write a program that produces output which has a code point sum identical to the source's code point sum.
To produce a code point sum:
- Find the values of the characters in the program's character set.
For example -
- Add them all together.
Code point sum of
O= 70+79+79 = 228.
An example of an ASCII sum quine would be if the source code was
ABC and the output was
!!!!!!. This is because the sum of the the ASCII values of the source (
A = 65,
B = 66,
C = 67, sum = 198) is the same as the sum of the ASCII values in the output (
! = 33, 33*6 = 198).
BBB would also be valid output, as would
- Your program must not be a reverse, shuffled, error, or any other type of "true" quine. To elaborate: If the output contains all the same characters as the source, it is invalid.
- Your program cannot use any errors/warnings from the compiler/interpreter as the output.
- Your program's source must use the same codepage as the output.
- Your program may use any codepage that was created before this challenge was.
- Your program's output must not contain any unprintable characters (e.g. ASCII 0 through 31, or above 127) aside from linefeeds and tabs.
- Standard loopholes apply.
- If the source and/or output has a trailing linefeed, it must be included in the code point sum.
- Compiler flags need to be included in the final byte count (score), but not the source's code point sum.
- The output/source may not be empty.
Shortest answer in byte count (not code point sum) wins. Please use this header format answers:
# Jelly, 12 bytes, sum 56 (SBCS)
You can use this tool to calculate ASCII sums.
Here are some useful codepage references.