Result

AC

Duration

788ms

Code [DL]

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

stdin

              T                                   
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
        K                                         

stdout

              T                                   
              T                                   
              T                                   
              T                                   
              T                                   
              T                                   
              T                                   
              T                                   
              T                                   
        KKKKKKT                                   

stderr

<internal:golf_prelude>:4: warning: redefining Object#method_missing may cause infinite loop

strace