Result

AC

Duration

2415ms

Code [DL]

i=input().find('T')
d=-1
while 1:print([' '*d+'*'*(i-d+1),' '*i+'*'][d<0]);d=input().find('K')

stdin

                                   T              
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
            K                                     

stdout

                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
                                   *
            ************************

stderr

Traceback (most recent call last):
  File "/volume/CODE", line 3, in <module>
    while 1:print([' '*d+'*'*(i-d+1),' '*i+'*'][d<0]);d=input().find('K')
EOFError: EOF when reading a line

strace