模拟题,各种做
注意 scanf("%s%s",&s,&t); s和t都是从0开始的
字符串长度函数为strlen(s)
#include<cstdio>
#include<iostream>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<functional>
#include<algorithm>
#include<cctype>
using namespace std;
#define MAXN (50+10)
char s[MAXN],t[MAXN];
int main()
{
scanf("%s%s",&s,&t);
int j=0;
for (int i=0;i<strlen(t);i++)
{
if (t[i]==s[j]) j++;
}
cout<<1+j<<endl;
}