Result

AC

Duration

1145ms

Code [DL]

t=l=fgetl(0);
[i]=strchr(l,"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            
                                     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 3, column 21 in file '/volume/CODE'

strace