Scala 3 -language:postfixOps
, 940940 748 bytes
@main def m:Unit=
val s="""@main def m:Unit=
val s=Q%sQ
var x=()
def p=print("515")
s=Q%sQ;var classx=0;class main extends annotation.Annotation{valdef dval=0;defdval=print(420);def d=printf(s.replace(""+81.toChar,(""+34.toChar)*3"\""*3),s,s)}
return
new main()dval
x=px=0
@main def n=
{val s=Q%sQ
printfs=Q%sQ;printf(s.replace(""+81.toChar,(""+34.toChar)*3"\""*3),s,s)
val p=0"""
var x=()
def p=print("515")
}""";var classx=0;class main extends annotation.Annotation{valdef dval=0;defdval=print(420);def d=printf(s.replace(""+81.toChar,(""+34.toChar)*3"\""*3),s,s)}
return
new main()dval
x=px=0
@main def n=
{val s="""@main def m:Unit=
val s=Q%sQ
var x=()
def p=print("515")
s=Q%sQ;var classx=0;class main extends annotation.Annotation{valdef dval=0;defdval=print(420);def d=printf(s.replace(""+81.toChar,(""+34.toChar)*3"\""*3),s,s)}
return
new main()dval
x=px=0
@main def n=
{val s=Q%sQ
printfs=Q%sQ;printf(s.replace(""+81.toChar,(""+34.toChar)*3"\""*3),s,s)
val p=0"""
printf}""";printf(s.replace(""+81.toChar,(""+34.toChar)*3"\""*3),s,s)
val p=0}
x
is 515420.
Try the first x bytes online!Try the first x bytes online!
Try the last (n-x) bytes online!Try the last (n-x) bytes online!
The entire thingFirst x bytes, prettified (minimized...
contains the entire program):
@main def m:Unit= Unit =
val s="""s = """..."""
var x=()
x def= p=print("515")0
class main extends annotation.Annotation{val dval=0;def d=printf(s.replace(""+81.toChar,(""+34.toChar)*3),s,s)}{
return
def dval new= mainprint(420)dval //The split happens between 'd' and 'v' here
x=p
@main def n=
val s="""..."""
d = printf(s.replace(""+81.toChar,(""+34.toChar)*3),s,s)
val p=0
First x bytes (minimized):
@main def m:Unit=
"" val+ s="""..81."""
var x=()
def p=print("515")
class main extendstoChar, annotation.Annotation{val"\"" dval=0;def* d=printf(s.replace(""+81.toChar,(""+34.toChar)*33), s, s)}
return}
return new main().d
Last (n-x) bytes, prettified (minimized...
contains the entire program):
val
x = x=p0
@main def n=
n = {
val s="""s = """..."""
printf(s.replace(""+81"" + 81.toChar,(""+34.toChar)*3 "\"" * 3), s, s)
val p=0}