by@paradigm_9
AC
3129ms
s=`dd` puts s.gsub(/\n.{#{s=~/T/}}/,"\\0T").sub /K */{|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 T T T T T T T T T T T T T T T T T T KKKKKKKT
4+1 records in 4+1 records out 2142 bytes (2.1 kB, 2.1 KiB) copied, 0.000106389 s, 20.1 MB/s