by@k_hanazuki
AC
727ms
$_=`dd`;/T/;s/^.{$-[0]}\K /T/mg;s/K */K x length$&/ge;print T
K
T
T
T
T
T
T
T
T
KKKKKKKKT
0+1 records in 0+1 records out