Result

AC

Duration

1010ms

Code [DL]

give s?s p=substr(s,"T")while 1 give t q=substr(t,"K")if q ?copy(" ",q-1)+copy("1",p-q+1) exit else?s ok end

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     
     1111111111111111111111111111111111111111

stderr

strace