Result

WA

Duration

684ms

Code [DL]

PUT 0 IN k
FOR i IN {1..50}:
	READ s RAW
	FOR j IN {1..50}:
		IF s@j|1 = "T":PUT j IN t
		IF s@j|1 = "K":PUT j IN k
	SELECT:
		k<>0:
			WRITE " "^^k,"K"^^t-k
			QUIT
		ELSE:
			WRITE " "^^t-1,"T"/

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
                                    T
                                    T
                                    T
                                    T
                                    T
                                    T
                                    T
                                    T
                                    T
                                    T
                 KKKKKKKKKKKKKKKKKKKK

stderr

strace