Result

AC

Duration

690ms

Code [DL]

give s?s p=substr(s,"T")while 1 give t q=substr(t,"K")if q{?copy(" ",q-1)+copy("1",p-q+1)exit}?s end

stdin

                                                T 
                                                  
                       K                          

stdout

                                                T 
                                                T 
                       11111111111111111111111111

stderr

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffc6882e8c0 /* 9 vars */) = 0
11    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x562246a96d18 /* 9 vars */) = 0
11    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
12    execve("/bin/ln", ["ln", "-sf", "/volume/CODE", "/tmp/code.ring"], 0x562246a96d38 /* 9 vars */) = 0
12    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
13    execve("/bin/cat", ["cat", "-"], 0x562246a96d30 /* 9 vars */ <unfinished ...>
14    execve("/root/ring", ["/root/ring", "/tmp/code.ring"], 0x562246a96d40 /* 9 vars */ <unfinished ...>
13    <... execve resumed> )            = 0
13    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    <... execve resumed> )            = 0
14    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=0, si_utime=0, si_stime=2} ---
15    execve("/bin/rm", ["rm", "/tmp/code.ring"], 0x562246a96c98 /* 9 vars */) = 0
15    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
10    +++ exited with 0 +++