#include <bits/stdc++.h> using namespace std; int main() { string a,b; while(cin>>a) { cin>>b; int ans=a.find(b); if(ans!=-1) { cout<<ans+1<<endl; } else cout<<ans<<endl; } return 0; }
Double click to view unformatted code.