Result

AC

Duration

693ms

Code [DL]

read "s" =
s p
s "T" f "t" =
1 w{
read "K" f "k" =
k if
" " k 1 - m w
"K" t k - 1 + m p
exit
end
s p
1
}

stdin

                                                 T
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                 K                                

stdout

                                                 T
                                                 T
                                                 T
                                                 T
                                                 T
                                                 T
                                                 T
                                                 T
                                                 T
                 KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK

stderr

strace

11    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffe3a8a4460 /* 7 vars */) = 0
12    execve("/bin/cat", ["cat", "-"], 0x5630dced2d60 /* 8 vars */) = 0
13    execve("/usr/bin/lua5.3", ["/usr/bin/lua5.3", "main.lua", "/volume/CODE"], 0x5630dd9c6068 /* 8 vars */) = 0
12    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
13    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
11    +++ exited with 0 +++