View Code of Problem 3832

#include<bits/stdc++.h>
using namespace std;
int main(){
	string s,s1;
	while(cin>>s>>s1){	
		if(s.find(s1)!=-1)
		{
			cout<<s.find(s1)+1<<endl;
		}
		else
		{
			cout<<-1<<endl;
		}
	}
}

Double click to view unformatted code.


Back to problem 3832