#include<stdio.h> #include<string.h> int main() { char s; char t; int i; while(scanf("%s",s)!=NULL) { gets(t); i=strstr(s,t); if(i>=0) printf("%d\n",i+1); else printf("-1\n"); } return 0; }
Double click to view unformatted code.