by@n4o847
AC
2548ms
x=`dd`.split ' ';x[..-2].map{|s|puts s.sub(x[0]=~/T/||0,'T').sub /K *T/{|y|"K"*y.size}}
T K
T T T T T T T T T T T T T T T T T T T T T T T KKKKK
2+1 records in 2+1 records out 1224 bytes (1.2 kB, 1.2 KiB) copied, 0.000102128 s, 12.0 MB/s