Result

AC

Duration

1475ms

Code [DL]

%%!
f(S)->case string:chr(io:get_line(S),$K)of
0->f(S);J->io:format("~*cA~*c",[J-1,$ ,string:chr(S,$T)-J,$*])end.
main(_)->f(io:get_line("")).

stdin

                                            T     
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                      K           

stdout

                                            T     
                                            T     
                                            T     
                                            T     
                                            T     
                                            T     
                                            T     
                                            T     
                                            T     
                                            T     
                                            T     
                                      A******

stderr

strace