C# 代码
public class Solution {
public int AppendCharacters(string s, string t) {
int n = s.Length, m = t.Length;
int i = 0, j = 0;
while (i < n && j < m){
if (s[i] == t[j]){
i++;
j++;
}
else{
i++;
}
if (j == m) return 0;
}
return m - j;
}
}