Result

AC

Duration

1323ms

Code [DL]

[i]=strchr(l=fgetl(0),"T");
do disp(l);until[t]=strchr(k=fgets(0),"K")
disp([substr(k,1,t),repmat(['*'],1,i-t)])

stdin

                               T                  
                                                  
                 K                                

stdout

                               T                  
                               T                  
                 K**************

stderr

octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
warning: suggest parenthesis around assignment used as truth value near line 2, column 20 in file '/volume/CODE'

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fff882c8ad0 /* 7 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x56548b194d30 /* 7 vars */) = 0
12    execve("/usr/bin/octave", ["/usr/bin/octave", "/volume/CODE"], 0x56548b194d40 /* 7 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("/usr/bin/octave-cli-5.1.0", ["/usr/bin/octave-cli-5.1.0", "/volume/CODE"], 0x7ffd385b7100 /* 7 vars */) = 0
13    +++ exited with 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=9, si_stime=11} ---
10    +++ exited with 0 +++