Result

WA

Duration

726ms

Code [DL]

give s
p=substr(s,"T")
while 1
give s
for i=2 to p see" "next
?1
q=substr(s,"K")
if q
for i=2 to q see" "next
for i=2 to p-q see 1 next
exit
ok
end

stdin

              T                                   
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
          K                                       

stdout

              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
              1
          111

stderr

strace