View Code of Problem 3832

#include <iostream>
#include <cstdio>
using namespace std;
int main(){
    string a,b;
    while(cin>>a>>b){
        long int ans=a.find(b);
        if(ans>=0)
            cout<<ans+1<<endl;
        else
            cout<<ans<<endl;
    }
    return 0;
}















Double click to view unformatted code.


Back to problem 3832