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