#include<bits/stdc++.h> using namespace std; typedef long long ll; int main (){ string str, s; while(cin>>str>>s){ if(str.find(s)!=-1){ printf("%d\n", str.find(s)+1); }else{ printf("-1\n"); } } return 0; } |
Double click to view unformatted code.