编辑代码

#include <stdio.h>
#include <string.h>
int main () {
    char str[10000000];
    while(scanf("%s",str)!=EOF){
        char str1[10000000],*ch;
        scanf("%s",str1);
        ch=strstr(str,str1);
        if(ch!=NULL)
        printf("%ld\n",ch-str+1);
        else
        printf("-1\n");
    }
}