by@k_hanazuki
AC
1260ms
lines>>.&{given $=$_~|($!//=$_) {1 while s/k\s/kk/;.say}}
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 t t t kkkkkkkkt
WARNINGS for /volume/CODE: Useless use of constant integer 1 in sink context (use Nil instead to suppress this warning) (line 1)