Result

WA

Duration

2233ms

Code [DL]

let p=print_endline open String open List let rec r x=try r(read_line()::x)with _->x let _=r[]|>rev|>fold_left(fun l s->if l=0 then(p s;index s 'T')else(p(try(let i=index s 'K'in make i 32^"K"^make(l-i)'*')with _->make l 32^"*");l))0

stdin

                                T                 
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
      K                                           

stdout

stderr

File "/volume/CODE", line 1, characters 186-188:
Error: This expression has type int but an expression was expected of type
         char

strace