View Code of Problem 3832

#include<iostream>
using namespace std;

int main()
{
	string str1,str2;
	while(cin>>str1>>str2)
	{
		if(str1.find(str2)!=-1)
		{
			cout<<str1.find(str2)+1<<endl;
		}
		else
		{
			cout<<-1<<endl;
		}
	}
}

Double click to view unformatted code.


Back to problem 3832