C++ 代码
#include<bits/stdc++.h>
using namespace std;
int main(){
string a,b;
cin>>a>>b;
string s1=a+a,s2=b+b;
if((s1.find(b)!=string::npos)||(s2.find(a)!=string::npos)){
cout<<"true";
}
else cout<<"false";
return 0;
}