View Code of Problem 3832

#include<iostream>
#include<string>

using namespace std;

int main()
{
    string a,b;
    while(cin>>a>>b)
    {
        if(a.find(b)!=string::npos)
            cout<<a.find(b)+1<<endl;
        else
            cout<<"-1"<<endl;
    }

}

Double click to view unformatted code.


Back to problem 3832