View Code of Problem 3832

#include<iostream>
#include<string>
#include<math.h>
using namespace std;

int main(){
	string a,b;
	while(cin>>a>>b){
		int n=a.find(b);
		if(n>=0)
		cout<<n+1<<endl;
		else cout<<n<<endl;
	} 
	return 0;
}

Double click to view unformatted code.


Back to problem 3832