莱州网站开发/成都网站制作关键词推广排名
题目:
在一行上输入两个字符串s和英文字符串t,要求在s中查找t。其中,字符串s,t均不包含空格,且长度均小于80。
输入格式:
首先输入一个正整数T,表示测试数据的组数,然后是T组测试数据。
每组测试输入2个长度不超过80的字符串s和t(s和t都不包含空格)。
输出格式:
对于每组测试数据,若在s中找到t,则输出“Found!”,否则输出“not Found!”。引号不必输出。
输入样例:
2
dictionary lion
factory act
输出样例:
not Found!
Found!
#include<iostream>using namespace std;
int main(){int n;cin>>n;string s,t;for(int i=0;i<n;i++){cin>>s>>t;if(s.find(t)!=-1)cout<<"Found!"<<endl;elsecout<<"not Found!"<<endl;}return 0;
}