Result

AC

Duration

857ms

Code [DL]

#!ruby -np
$_[I||=$_=~/T/]=?T;$_[/K */]&&=?K*$&.size

stdin

                                         T        
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                           K                      

stdout

                                         T        
                                         T        
                                         T        
                                         T        
                                         T        
                                         T        
                                         T        
                                         T        
                                         T        
                                         T        
                                         T        
                                         T        
                                         T        
                           KKKKKKKKKKKKKKT        

stderr

strace