by@k_hanazuki
AC
757ms
s=`dd`;puts s.gsub(/^(.{#{s=~/T/}}) /,'\1T').sub(/K */){?K*$&.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 T T KKKKKKKKKKKKKKKKKKKKKKKKKT
2+1 records in 2+1 records out