Result

AC

Duration

794ms

Code [DL]

	T = INPUT
	S = INPUT
	OUTPUT = T
F	OUTPUT = T
	K = INPUT
	DIFFER(S,K)	:S(S) F(F)
S 	K = TRIM(K)
H	EQ(SIZE(K),SIZE(TRIM(T)))	:S(T)
	K = K '*'	:(H)
T	OUTPUT = K
END

stdin

                   T                              
                                                  
    K                                             

stdout

                   T                              
                   T                              
    K***************

stderr

strace