Skip to content

Sidhudog/hello-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

//colourfulstones(simplified edition) #include using namespace std; int main() { int i, n = 1, k = 0; string s, t;

cin >> s >> t;
if (s.length() >= t.length())
{
    for (i = 0; i < t.length(); i++)
    {
        if (s[k] == t[i])
        {
            k++;
            n++;
        }
    }
}
else
{
    for (i = 0; i < t.length(); i++)
    {
        if (s[k] == t[i])
        {
            k++;
            n++;
        }
    }
}
    cout << n;

    return 0;
}

About

just my first project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors