by@k_hanazuki
AC
1626ms
$_=`dd`;/T/;s/(?<=\n.{@{[length$`]}}) /#/g;s/(?<=K) */"#"x length$&/ge;print
T K
T # # # # # # # # # # # K################
1+1 records in 1+1 records out