题解 2073: [STL训练]亲和串

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

[STL训练]亲和串-题解(C++代码)

我的是C++风格的,上面的题解是C风格的```#include#includeusingnamespacestd;intmain(){strings1,s2;while(cin>>s1>>s2){s1+=s1;if(s1.find(s2)!=string::npos)cout

[STL训练]亲和串(java版)

####解题思路:#####用String类中的indexOf()函数,查看字符串中是否包含另一字符串。本题中说是否能够循环移位得到亲和串,那么把字符串1加上自己本身得到新的字符串,这样再看字符串2是否包含在新的字符串中。####注意事项:#####indexOf()返回-1表示没有包含此字符串!##

太简单了,我都不想解释

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    string a,b;    while(cin>>a……

python简易解法

摘要:解题思路:注意事项:参考代码:while True: try: a=input() b=&#39;&#39;.join(input().split()) c=&#39;&#39;.join((a……

编写题解 2073: [STL训练]亲和串

摘要:解题思路:注意事项:参考代码:while True:     try:         a=input().strip()         b=input().strip()         ……