by@kcz146
WA
752ms
x,*b,c=*$<;c[?K]=?a*99;puts x*-~b.size,c[0..~/T/]
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 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa