| Bytes | Lang | Time | Link |
|---|---|---|---|
| 000 | Haskell | 250925T223017Z | dthusian |
| 001 | PowerShell | 250815T072548Z | user3141 |
Haskell, 166.51 score, 0-based
n = 488, r = 323, w = 165
f=let c=toEnum 34;d=succ c;v i x y l|l==[]=y++[c]++x++[c]|l!!0==d&&l!!1==d=show(i+164)|l!!0==d=v(i+2)x(y++[l!!1])$drop 2 l|otherwise=show(i+163);s x=v 0 x[]x in s"#f#=#l#e#t# #c#=#t#o#E#n#u#m# #3#4#;#d#=#s#u#c#c# #c#;#v# #i# #x# #y# #l#|#l#=#=#[#]#=#y#+#+#[#c#]#+#+#x#+#+#[#c#]#|#l#!#!#0#=#=#d#&#&#l#!#!#1#=#=#d#=#s#h#o#w#(#i#+#1#6#4#)#|#l#!#!#0#=#=#d#=#v#(#i#+#2#)#x#(#y#+#+#[#l#!#!#1#]#)#$#d#r#o#p# #2# #l#|#o#t#h#e#r#w#i#s#e#=#s#h#o#w#(#i#+#1#6#3#)#;#s# #x#=#v# #0# #x#[#]#x# #i#n# #s"
Is an f :: String which is its own source code normally, or a base-10 integer if the (0-indexed) 163th to 485th character is removed (i.e. any part of the string literal except the last character).
Explanation
v is a recursive function that detects if there are two #s consecutively or if there is two non-#s consecutively. # is interleaved in the string literal containing the rest of the program.
Annotated source:
f = let c = toEnum 34 -- "
d = succ c -- #
v i x y l | l == [] = y ++ [c] ++ x ++ [c]
| l !! 0 == d && l !! 1 == d = show (i + 164)
| l !! 0 == d = v (i + 2) x (y ++ [l !! 1]) $ drop 2 l
| otherwise = show (i + 163)
s x = v 0 x [] x
in s "..."
PowerShell, 2 bytes, Score 1, 1-based
21
"Right" ks: 1, 2 ('all of them')
n = 2, r = 2, w = 0
Score = 0 + 2/2 = 1
A valid PowerShell can consist of just a string or integer value, which will just be sent to the output.
For the sake of completeness:
PowerShell, 2 bytes, Score 1, 0-based
10
"Right" ks: 0, 1
Same idea as above.