Result

AC

Duration

1304ms

Code [DL]

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

stdin

                    T                             
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
 K                                                

stdout

                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
                    T                             
 ********************

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