TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
a=list(input())
b=list(input())
hantei=True
for i in range(len(a)):
	c=[]
	c.append(a[-1])
	for i in range(0,len(a)-1):
		c.append(a[i])
	a=c
	if c==b:
		hantei=True
		break
	else:
		hantei=False

if hantei==False:
	print("No")
else:
	print("Yesk")


a=list(input())
b=list(input())
hantei=True
for i in range(len(a)):
	c=[]
	c.append(a[-1])
	for i in range(0,len(a)-1):
		c.append(a[i])
	a=c
	if c==b:
		hantei=True
		break
	else:
		hantei=False

if hantei==False:
	print("No")
else:
	print("Yes")


Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s=str(input())
t=str(input())
a=True
for i in range(101):
    if s==t:
        print("Yes")
        a=False
        break
    s=s[-1]+s[:-2]
if a:
    print("No")

s=str(input())
t=str(input())
a=True
for i in range(len(s)):
    if s==t:
        a=False
        break
    s=s[-1]+s[:-2]
if a:
    print("No")
else:
    print("Yes")
    

s=str(input())
t=str(input())
a=0
while a<=100:
    a+=1
    s=s[-1]+s[:-2]
    if s==t:
        print("Yes")
        break
if a>100:
    print("No")
    

s=str(input())
t=str(input())
a=True
for i in range(len(s)):
    if s==t:
        a=False
        break
    s=s[-1]+s[:-1]
if a:
    print("No")
else:
    print("Yes")

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
print("Yes" if input() in tuple(s1[i:] + s1[:i] for i in range(len(s1))) else "No")


s1 = input()
print("Yes" if input() in tuple(s1[i:] + s1[:i] for i in range(len(s1))) else "No")


Verdicts: Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s = list(input())
t = list(input())
for i in range(len(s)):
    tmp = s[-1]
    for j in range(len(s)-1)[::-1]:
        s[j+1] = s[j]
    s[0]=tmp
    if s == t:
        print("yes")
        break
else:
    print("no")

s = list(input())
t = list(input())
for i in range(len(s)):
   	tmp = s[-1]
   	for j in range(len(s)-1)[::-1]:
       	s[j+1] = s[j]
   	s[0]=tmp
   	print(s)
   	if s == t:
       	break
else:
   	print("no")

s = list(input())
t = list(input())

for i in range(len(s)):
    tmp = s[len(s)-1]
    for j in range(len(s))[::-1]:
        s[j] = s[j-1]
    s[0] = tmp
    if s == t:
        print("Yes")
        break
else:
    print("No")

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S=input()
T=input()

for i in range(len(S)):
    S=S[-1]+S[:-1]
    if T==S:
        print('Yes')
        exit()
    print(S)
print('No')

S=input()
T=input()

for i in range(len(S)):
    S=S[-1]+S[:-1]
    if T==S:
        print('Yes')
        exit()
    print(S)
print('No')

S=input()
T=input()

for i in range(len(S)):
    S=S[-1]+S[:-1]
    if T==S:
        print('Yes')
        exit()

print('No')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s=list(input())
t=list(input())
flag=False
cnt=0
if sorted(s)==sorted(t):
  a=s.index(t[0])
  for i in range(len(s)):
    b=i+a
    print(b)
    if b>=len(s):
      b-=len(s)
    if s[b]==t[i]:
      cnt+=1

if cnt==len(S):
  flag=True
print('Yes' if flag else 'No')

s=list(input())
t=list(input())
flag=False
cnt=0
if sorted(s)==sorted(t):
  a=s.index(t[0])
  for i in range(len(s)):
    b=i+a
    if b>=len(s):
      b-=len(s)
    if s[b]==t[i]:
      cnt+=1

if cnt==len(s):
  flag=True
print('Yes' if flag else 'No')


Verdicts: Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s, t = input(), input()
if s == t:
    print('Yes')
    exit(0)
for i in range(1, len(s)):
    print(s[:i], s[i:])
    print(t[-i:], t[:-i])
    if s[:i] == t[-i:] and s[i:] == t[:-i]:
        print('Yes')
        exit(0)
print('No')

s, t = input(), input()
if s == t:
    print('Yes')
    exit(0)
for i in range(1, len(s)):
    if s[:i] == t[-i:] and s[i:] == t[:-i]:
        print('Yes')
        exit(0)
print('No')

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()


if S == T :
    ans = "Yes"
else:
    list_S =list(S) 
    list_T =list(T) 
    L = list_S
    L  =  tuple(L)
    #print(L)
    ans = "N0"
    
    for i in range(1,len(S)+1):
        
        for j in range(len(S)):
            list_S[j] = L[-i+j]
            #print(L,list_S)
        print(list_S)
        #print(L)
        if list_S == list_T :
            ans = "Yes"
            break
print(ans) 

S = input()
T = input()


if S == T :
    ans = "Yes"
else:
    list_S =list(S) 
    list_T =list(T) 
    L = list_S
    L  =  tuple(L)
    #print(L)
    ans = "N0"
    
    for i in range(1,len(S)):
        
        for j in range(len(S)):
            list_S[j] = L[-i+j]
            #print(L,list_S)
        print(list_S)
        #print(L)
        if list_S == list_T :
            ans = "Yes"
            break
print(ans) 

N = input()

count = 0

for i in range(len(N)):
    count += int(N[i])
   
if int(N) % count == 0:
    print("Yes")
else:
    print("No")

S = input()
T = input()


if S == T :
    ans = "Yes"
else:
    list_S =list(S) 
    list_T =list(T) 
    L = list_S
    L  =  tuple(L)
    ans = "No"
    
    for i in range(1,len(S)+1):
        
        for j in range(len(S)):
            list_S[j] = L[-i+j]
        if list_S == list_T :
            ans = "Yes"
            break
print(ans)   

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s = input()
t = input()
for i in range(len(s)):
    if s==t:
        print('Yes')
        break;
    else:
        s = s[len(s)-1] + s[0:-1]
print('No')

s = input()
t = input()
for i in range(len(s)):
    if s==t:
        print('Yes')
        exit()
    else:
        s = s[len(s)-1] + s[0:-1]
print('No')


Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
import sys

input = sys.stdin.readline


def main():
    s = input().strip()
    t = input().strip()
    print('Yes' if any([s[-i:] + s[:-i] == t for i in range(len(s))]) 'No')


if __name__ == "__main__":
    main()


import sys

input = sys.stdin.readline


def main():
    s = input().strip()
    t = input().strip()
    print("Yes" if any([s[-i:] + s[:-i] == t for i in range(len(s))]) else "No")


if __name__ == "__main__":
    main()


Verdicts: Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
A = sorted(list(input()))
T = sorted(list(input()))

ans = 'Yes'

for i in range(len(A)):
  if A[i] != T[i]:
    ans = "No'
    
print(ans)

A = list(input())
T = str(input())

check = 'No'


for i in range(len(A)):
  if ''.join(A) == T:
    check = 'Yes'
  A.insert(A.pop(-1))

print(check)

A = list(input())
T = str(input())

check = 'No'

for i in range(len(A)):
  if ''.join(A) == T:
    check = 'Yes'
  A.insert(0, A.pop(-1))

print(check)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
def str_rot(a, b):
    i = 0
    while a != b and i < len(a)-1:
        a = a[-1] + a[:-1]
        i += 1
    
    if a != b:
        return False
    else:
        return True

def str_rot(a, b):
    i = 0
    while a != b and i < len(a)-1:
        a = a[-1] + a[:-1]
        i += 1

    if a != b:
        return 'No'
    else:
        return 'Yes'

str1 = input()
str2 = input()

if str1 == str2:
    print('Yes')

else:
    for i in range(len(str1) - 1):
    
        str1 = str1[-1] + str1[:-1]
    
        if str1 == str2:
            print('Yes')
            break
    
    if str1 != str2:
        print('No')

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):

#include <string>

#include <algorithm>

using namespace std;

string s,t;
int si;
int i;

int main(){
    cin >> s >> t;

    s = s + s;
    if(s.find(t) != s.npos){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
    
    return 0;
}


#include <string>

#include <algorithm>

using namespace std;

string s,t;
int i;

int main(){
    cin >> s;
    cin >> t;

    s = s + s;
    if(s.find(t) != s.npos){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
    
    return 0;
}

s = str(input())
t = str(input())
for i in range(len(s)):
  if s == t:
    print("Yes")
    exit()
  nu = t[-1]
  t = nu+t[:-1]
print("No")

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s=input()
t=input()
rs=s[::-1]
if rs==t or s==t:
  print("Yes")
else:
  print("No")

S=input()
T=input()
ans=0
for i in range(len(S)):
  S=S[-1]+S[:-1]
  if S==T:
    ans=1
    break
if ans==0:
  print("No")
else:
  print("Yes")

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
for i in range(10):
  pass
else:
  print("Hoge")

s = input()
t = input()
for i in range(len(s)):
  if s[i:]+s[:i] == t:
    print("Yes")
    break
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s = str(input())
t = str(input())

ans = 'No'

for i in range(len(s) - 1):
    if s != t:
        s = s[-1] + s[:-1]

    else:
        print('Yes')

else:
    print('No')


s = str(input())
t = str(input())

for i in range(len(s)):
    if s != t:
        s = s[-1] + s[:-1]

    else:
        print('Yes')
        break

else:
    print('No')


Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
a = str(input())
b = str(input())
check = 0
for i in range(len(a)):
  if a == b:
    check = 1
    break
  else:
    a = a[len(a)-1] + a[0:len(a)]
    
if check == 0:
  print("No")
else:
  print("Yes")
    
  
  

a = str(input())
b = str(input())
check = 0
for i in range(len(a)):
  if a = b:
    check = 1
    break
  else:
    a = a[len(a)] + a[0:len(a)]
    
if check = 0:
  print("No")
else:
  print("Yes")
    
  
  

a = str(input())
b = str(input())
check = 0
for i in range(len(a)):
  if a == b:
    check = 1
    break
  else:
    a = a[len(a)] + a[0:len(a)]
    
if check == 0:
  print("No")
else:
  print("Yes")
    
  
  

a = str(input())
b = str(input())
check = 0
for i in range(len(a)):
  if a == b:
    check = 1
    break
  else:
    a = a[len(a)-1] + a[0:len(a)-1]
    
if check == 0:
  print("No")
else:
  print("Yes")
    
  
  

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s = input()
t = input()

sr = s[::-1]

if sr == t :
    print("Yes")
else :
    print("No")

import sys

s = input()
t = input()

a = int(len(s))

for i in range(0,a) :
    s = s[:a-1:]+s[a-1::]
    if s == t :
        print("Yes")
        sys.exist()

print("No")

import sys

s = input()
t = input()

a = int(len(s))

for i in range(0,a) :
    s = s[a-1::]+s[:a-1:]
    print(s)
    if s == t :
        print("Yes")
        sys.exit()

print("No")
    

s = input()
t = input()

s = list(s)
t = list(t)
s.sort()
t.sort()

print(s)
print(t)

if s == t :
    print("Yes")
else :
    print("No")

s = input()
t = input()

if (s+s) in t :
    print("Yes")
else :
    print("No")

s = input()
t = input()

if t in (s+s) :
    print("Yes")
else :
    print("No")

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
def rotate(i):
  return S[i+1:] + S[:i+1]

S = input()
T = input()

for i in range(len(S)):
  if T == rotate(i):
    print("Yes", i)
    exit()

print("No")

def rotate(i):
  return S[i+1:] + S[:i+1]

S = input()
T = input()

for i in range(len(S)):
  if T == rotate(i):
    print("Yes")
    exit()

print("No")

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = str(input())
T = str(input())
for i in range(len(S)):
    if S[i] != T[-(i+1)]:
        print("No")
        break
else:
    print("Yes")

S = str(input())
T = str(input())
for i in range(len(S)):
    if S[i-1] != T[-i]:
        print("No")
        break
else:
    print("Yes")

S = str(input())
T = str(input())
if T in S*2:
    print("Yes")
else:
    print("No")

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
#coding: utf-8

def checkStr():
    sA = s1
    for i in range(len(s1)):
        sA = sA[len(s1) - 1:len(s1)] + sA[0:len(s1) - 1]
        print (sA)
        if sA == s2:
            return True
    return False

s1 = input()
s2 = input()
if checkStr():
    print ("Yes")
else:
    print ("No")


#coding: utf-8

def checkStr():
    sA = s1
    for i in range(len(s1)):
        sA = sA[len(s1) - 1:len(s1)] + sA[0:len(s1) - 1]
        if sA == s2:
            return True
    return False

s1 = input()
s2 = input()
if checkStr():
    print ("Yes")
else:
    print ("No")


Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()
L = len(S)
St = []
Tr = []
ans = 'no'
for i in range(L-1):
    St.append(S[i:i+1])
    Tr.append(S[i:i+1])
for i in range(L):
    if St == Tr:
        ans = 'yes'
    else:
        St.insert(0,St[L-1])
        St.remove(St[L-1])

print(ans)


S = input()
T = input()
L = len(S)
St = []
Tr = []
ans = 'no'
for i in range(L):
    St.append(S[i:i+1])
    Tr.append(T[i:i+1])

for i in range(L):
    if St == Tr:
        ans = 'yes'
        break
    else:
        St.insert(0,St[L-1])
        del St[L]

print(ans)



S = input()
T = input()
L = len(S)
St = []
Tr = []
ans = 'no'
for i in range(L):
    St.append(S[i:i+1])
    Tr.append(T[i:i+1])

for i in range(L):
    if St == Tr:
        ans = 'yes'
        break
    else:
        St.insert(0,St[L-1])
        del St[L]

print(ans)



S = input()
T = input()
L = len(S)
St = []
Tr = []
ans = 'no'
for i in range(L):
    St.append(S[i:i+1])
    Tr.append(T[i:i+1])
print(St)
for i in range(L):
    if St == Tr:
        ans = 'yes'
    else:
        St.insert(0,St[L-1])
        St.remove(St[L-1])

print(ans)



S = input()
T = input()
L = len(S)
St = []
Tr = []
ans = 'No'
for i in range(L):
    St.append(S[i:i+1])
    Tr.append(T[i:i+1])

for i in range(L):
    if St == Tr:
        ans = 'Yes'
        break
    else:
        St.insert(0,St[L-1])
        del St[L]

print(ans)



Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s = input("S: ")
t = input("T: ")
answer = "Yes" if s in t * 2 else "No"
print(answer)


s = input()
t = input()
answer = "Yes" if s in t * 2 else "No"
print(answer)


Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S, T = stdin.readline().rstrip().split()
S = S[::-1]
if S == T:
  print("Yes")
else:
  print("No")

S,T = str(stdin.readline().rstrip()).lower()
S = S[::-1]
if S = T:
  print("Yes")
else:
    print("No")

S = input()
T = input()
S = S[::-1]
if S == T:
  print("Yes")
else:
  print("No")

S = input().lower
T = input().lower

for i in range(len(S)):
  S = S[len(S)-1:len(S)] + S[0:len(S)-1]
  if S == T:
    break
if S == T:
  print("Yes")
else:
  print("No")

S = input().lower
T = input().lower
for i in range(len(S)):
  S = S[len(S)-1:len(S)] + S[0:len(S)-1]
  if S == T:
    break
if S == T:
  print("Yes")
else:
  print("No")

S,T = str(stdin.readline().rstrip()).lower()
S = S[::-1]
if S == T:
  print("Yes")
else:
  print("No")

S,T = str(stdin.readline().rstrip()).lower()
S = S[::-1]
if S == T:
  print("Yes")
else:
    print("No")

from sys import stdin
S, T = stdin.readline().rstrip().split()
S = S[::-1]
if S == T:
  print("Yes")
else:
  print("No")

S = input().lower()
T = input().lower()
for i in range(len(S)):
  S = S[len(S)-1:len(S)] + S[0:len(S)-1]
  if S == T:
    break
if S == T:
  print("Yes")
else:
  print("No")

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S,T = map(str,input().split())

import sys

for i in range(len(S)):
    if S[i:len(S)] + S[:i] == T:
        print("Yes")
        sys.exit()
    
print("No")

S = input()
T = input()

import sys

for i in range(len(S)):
    if S[i:len(S)] + S[:i] == T:
        print("Yes")
        sys.exit()
    
print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
#n = int(input())
#h, w = map(int,input().split())
#ls = list(map(int,input().split()))


s1 = input()
s2 = input()

for i in range(len(s1)):
  if s1[i:i+len(s1)] == s2:
    print("Yes")
    quit()
    
print("No")

s1 = input()
s2 = input()
if (s1 + s1).find(s2) >= 0:
  print("Yes")
  quit()

print("No")

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
#abc103 b
s=input()
t=input()
flag=False
for i in range(n):
    new_t=t[-1]
    new_t+=t[:-1]
    if new_t==s:
        flag=True
        break
    t=new_t

print("Yes" if flag else "No" )

#abc 103 b
s=input()
t=input()
flag=False
for i in range(-1,-len(s)-1,-1):
    new_t=""
    for j in range(len(s)):
        new_t+=t[i+j]
    #print(i,s,new_t)
    if new_t==s:
        flag=True
        break
if flag:
    print("Yes")
else:
    print("No")


Verdicts: Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
import sys
from sys import stdin
s = list(stdin.readline().rstrip())
t = list(stdin.readline().rstrip())
for i in range(len(s)):
    s=list(s[-1])+s[:len(s)-1]
    print(s)
    if s==t:
        print('Yes')
        sys.exit()
print('No')


import sys
from sys import stdin
s = list(stdin.readline().rstrip())
t = list(stdin.readline().rstrip())
for i in range(len(s)):
    s=list(s[-1])+s[:len(s)-1]
    if s==t:
        print('Yes')
        sys.exit()
print('No')


Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s=[i for i in input()]
t=[i for i in input()]
a=0
for i in range(len(s)):
    if s==t:
        a+=1
    s=[s[i] for i in range(-1,len(s)-1)]
print("Yes" if a>=1 else "No")s=[i for i in input()]
t=[i for i in input()]
a=0
for i in range(len(s)):
    if s==t:
        a+=1
    s=[s[i] for i in range(-1,len(s)-1)]
print("Yes" if a>=1 else "No")

s=[i for i in input()]
t=[i for i in input()]
a=0
for i in range(len(s)):
    if s==t:
        a+=1
    s=[s[i] for i in range(-1,len(s)-1)]
print("Yes" if a>=1 else "No")

Verdicts: Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s = list(input())
t = list(input())

for i in range(len(s)):
    s.insert(0, s[-1])
    s.remove(s[-1])
    if s == t:
        print("Yes")
        break
    elif i == len(s)-1:
        print("No")


s = list(input())
t = list(input())

for i in range(len(s)):
    s.insert(0, s[-1])
    del s[0]
    if s == t:
        print("Yes")
        break
    elif i == len(s)-1:
        print("No")


s = list(input())
t = list(input())

for i in range(len(s)):
    s.insert(0, s[-1])
    del s[-1]
    if s == t:
        print("Yes")
        break
    elif i == len(s)-1:
        print("No")


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()
S_turn = S
if(S_turn == T):
    print("Yes")
else:
    for i in range(len(S)):
        S_turn = S_turn[-1] + S_turn[:-1]
        if(S_turn == T):
            print("Yes")
            break
        else:
            continue
        break
    print("No")


s = input()
t = input()
for _ in range(len(s)):
    if s == t:
        print('Yes')
        break
    s = s[-1] + s[:-1]
else:
    print('No')

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S0 = input().strip()
S1 = input().strip()
ok = "No"
for i in range(len(S0)):
  if S0 == Si[i:] + S1[:i]:
    ok = "Yes"
print(ok)

S0 = input().strip()
S1 = input().strip()
ok = "No"
for i in range(len(S0)):
  if S0 == S1[i:] + S1[:i]:
    ok = "Yes"
print(ok)

Verdicts: Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s = input()
t = input()
n = len(s)
f = False
for i in range(n):
    print(s)
    if s == t:
        f = True
        break
    else:
        s = s[n-1] + s[:n-1] 
if f:
    print("Yes")
else:
    print("No")
        

s = input()[::-1]
if s == input():
    print("Yes")
else:
	print("No")

s = input()[::-1]
if s == input():
    print("Yes")
else:
	print("No")

s = input()
t = input()
n = len(s)
f = False
for i in range(n):
    if s == t:
        f = True
        break
    else:
        s = s[n-1] + s[:n-1] 
if f:
    print("Yes")
else:
    print("No")
        

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s = list(input())
t = list(input())

for i in range(len(s)):
    s = s[len(s) - 1:] + s[0:len(s) - 1]
    print(s)
    print(t)
    if s == t:
        print("Yes")
        exit()

print("No")

s = list(input())
t = list(input())

for i in range(len(s)):
    s = s[len(s) - 1:] + s[0:len(s) - 1]
    if s == t:
        print("Yes")
        exit()

print("No")

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):

S = input()
T = input()

N = len(S)

for i in range(N):
    print(S[N-i:] + S[:N-i])
    if S[N-i:] + S[:N-i] == T:
        print('Yes')
        exit()
print('No')

S = input()
T = input()

N = len(S)

for i in range(N):
    if S[N-i:] + S[:N-i] == T:
        print('Yes')
        exit()
print('No')

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
# your code goes here
S = input()
T = input()

ans = False
for i in range(len(T)):
	if S[0] == T[i]:
		flag = True
		for j in range(len(S)):
			if S[j] != T[(i+j)%len(T)]:
				flag = False
				break
	if flag:
		ans = True
		break
		
if ans:
	print('Yes')
else:
	print('No')

# your code goes here
S = list(input().split())
T = list(input().split())

ans = False
for i in range(len(S)):
	if S == T:
		ans = True
		break
	S.insert(0,S[-1])
	del S[-1]
		
if ans:
	print('Yes')
else:
	print('No')

# your code goes here
S = list(input())
T = list(input())

ans = False
for i in range(len(S)):
	if S == T:
		ans = True
		break
	S.insert(0,S[-1])
	del S[-1]
		
if ans:
	print('Yes')
else:
	print('No')

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()
f = False

for i in range(len(S)):
  if S[:i]+S[i:]==T:
    f = True

if f:
  print("Yes")
else:
  print("No")


if input() in 2*input():
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()
X = 0
for i in range(len(S)):
  S = S[-1] + S[:-1] 
  print(S)
  if S == T:
    X = 1

if X == 0:
  print('No')
elif X == 1:
  print('Yes')

S = input()
T = input()
X = 0
for i in range(len(S)):
  S = S[-1] + S[:-1] 
  if S == T:
    X = 1

if X == 0:
  print('No')
elif X == 1:
  print('Yes')

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = list(input())
T = list(input())
len = len(S)
T[0] = T[len-1]
if S == T:
    print("Yes")
else:
    print("No")


from sys import exit
S = list(input())
T = list(input())

for i in range(len(S)):
    if S == T:
        print("Yes")
        exit()
    S.insert(0, S.pop(-1))
print("No")


Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()

if set(S)!=set(T):
    ans = 'No'

for i in len(S):
    if ans:
        break
    U = S[i:]+S[:i]
    if U==T:
        ans = 'Yes'

if not ans:
    ans = 'No'

print(ans)

S = input()
T = input()

if set(S)!=set(T):
    ans = 'No'

for i in range(len(S)):
    if ans:
        break
    U = S[i:]+S[:i]
    if U==T:
        ans = 'Yes'

if not ans:
    ans = 'No'

print(ans)

S = input()
T = input()

ans = ''

if set(S)!=set(T):
    ans = 'No'

for i in range(len(S)):
    if ans:
        break
    U = S[i:]+S[:i]
    if U==T:
        ans = 'Yes'

if not ans:
    ans = 'No'

print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S=input()
T=input()
TA=""
result="No"
if S==T:
  result="Yes"
else:
  for i in range(len(S)):
    S=S[len(S)-1]+S
    S.rstrip()
    if S==T:
      result="Yes"
      break
print(result)

S=input()
T=input()
S=S[::-1]
if S=T:
  print("Yes")
else:
  print("No")

S=input()
T=input()
TA=""
result="No"
if S==T:
  result="Yes"
else:
  for i in range(len(S)+1):
    S=S[len(S)-1]+S
    S.rstrip()
    if S==T:
      result="Yes"
      break
print(result)

S=input()
T=input()
S=S[::-1]
if S==T:
  print("Yes")
else:
  print("No")

S=input()
T=input()
TA=""
result="No"
for i in range(len(S)):
  S=S[len(S)-1]+S
  S.rstrip()
  if S==T:
    result="Yes"
    break
print(result)

S=input()
T=input()
S=S*2
if T in S:
  print("Yes")
else:
  print("No")

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s, t = input(), input()
for i in range(len(s)):
    print(s[len(s)-i:]+s[:len(s)-i])
    if t == s[len(s)-i:]+s[:len(s)-i]:
        print('Yes')
        break
else:
    print('No')

s, t = input(), input()
for i in range(len(s)):
    if t = s[len(t)-i:]+s[i:len(t)-i]:
        print('Yes')
        break
else:
    print('No')

s, t = input(), input()
for i in range(len(s)):
    if t == s[len(s)-i:]+s[:len(s)-i]:
        print('Yes')
        break
else:
    print('No')

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()

L = len(S)

bl = False
bl = [True for i in range(L) if S[i:] == T[:L-i] and S[:i] == T[L-i:]:]

answer = 'Yes' if bl else 'No'
print(answer)

S = input()
T = input()

L = len(S)

bl = False
for i in range(L):
  if S[i:] == T[:L-i] and S[:i] == T[L-i:]:
    bl = True

answer = 'Yes' if bl else 'No'
print(answer)

Verdicts: Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()

Tempo = 0
for i in range(len(S)):
  S = S[-1] + S[:-1]
  if S == T:
      Tempo = Tempo + 1
      print(i)

if Tempo > 0:
    print("Yes")
else:
    print("No")



S = input()
T = input()

Tempo = 0
for i in range(len(S)):
  S = S[-1] + S[:-1]
  if S == T:
      Tempo = Tempo + 1
if Tempo > 0:
  print("Yes")
else:
  print("No")



Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):

S=input()
T=input()
flg=0
for i in range(len(T)):
    T=T[-1]+T[:-1]
    if S == T:
        print("YES")
        break
else:
    print("NO")
    




S=input()
T=input()
flg=0
for i in range(len(T)):
    T=T[-1]+T[:-1]
    if S == T:
        print("Yes")
        break
else:
    print("No")
    



Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()
if S == T:
    print("Yes")
    exit()
for i in range(N):
    S = S[-1] + S[0 : len(S) - 1]
    if S == T:
        print("Yes")
        exit()
print("No")


S = input()
T = input()
if S == T:
    print("Yes")
    exit()
for i in range(len(S)):
    S = S[-1] + S[0 : len(S) - 1]
    if S == T:
        print("Yes")
        exit()
print("No")


Verdicts: Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s, t = input(), input()

cnt = 0
while cnt <= len(s):
    s = s[-1] + s[:-1]
    if s == t:
        print("YES")
        exit()
    cnt+=1
print("NO")

s, t = input(), input()
 
cnt = 0
while cnt <= len(s):
    s = s[-1] + s[:-1]
    if s == t:
        print("Yes")
        exit()
    cnt+=1
print("No")

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
# -*- coding: utf-8 -*-
from collections import deque
import sys
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

S = input()
T = input()

for i in range(N+1):
    if S == T[i:] + T[:i]:
        print("Yes")
        break
else:
    print("No")

# -*- coding: utf-8 -*-
from collections import deque
import sys
#input = sys.stdin.readline
def inpl(): return list(map(int, input().split()))

S = input()
T = input()

for i in range(len(S)+1):
    if S == T[i:] + T[:i]:
        print("Yes")
        break
else:
    print("No")

Verdicts: Runtime Error

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()

characters_num = len(T)

for i in range(characters_num):
    rotation_S = S[i:] + S[:i]
    print(rotation_S)
    if rotation_S == T:
        answer = 'Yes'
        break
    else:
        answer = 'No'

print(answer)

S = input()
T = input()

characters_num = len(T)

for i in range(characters_num):
    rotation_S = S[i:] + S[:i]
    if rotation_S == T:
        answer = 'Yes'
        break
    else:
        answer = 'No'
print(answer)

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
s,t=open(0);print(" YNeos"[t in[s[i:-1]+s[:i]for i in range(99)]::2])

s,t=open(0);print(" YNeos"[t[:-1]in[s[i:-1]+s[:i]for i in range(99)]::2])

Verdicts: Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()

if len(S)%2==1:
    if T == S[::-1]:
        print("Yes")
    else:
        print("No")
else:
    if T == S[::-1]:
        print("No")
    else:
        print("Yes")
        

S = input()
T = input()

if (len(S)%2==0)
    if T == S[::-1]:
        print("Yes")
    else:
        print("No")
else:
    if T == S[::-1]:
        print("No")
    else:
        print("Yes")
        

S = input()
T = input()

if T == S[::-1]:
    print("Yes")
else:
    print("No")

S = input()
T = input()
a = ""
for i in range(len(S)):
    a += (S[-1] + S[:-1])
    if a == T:
        print("Yes")
else:
    print("No")


S = input()
T = input()
a = ""
for i in range(len(S)+1):
    if i == 0:
        a = (S[-1] + S[:-1])
    else:
        a = a[-1] + a[:-1]
    if a == T:
        print("Yes")
        break
else:
    print("No")



Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: You are given string S and T consisting of lowercase English letters.  Determine if S equals T after _rotation_.  That is, determine if S equals T after the following operation is performed some number of times:  Operation: Let S = S_1 S_2 ... S_{|S|}. Change S to S_{|S|} S_1 S_2 ... S_{|S|-1}.  Here, |X| denotes the length of the string X.

Submission attempts (in order):
S = input()
T = input()

for i in range(len(S)):
	s = S[-1]
	S'= S[0:-1]
	if S==T
		print("Yes")
		break
	S = s + S'
else:
	print("No")

S = input()
T = input()

for i in range(len(S)):
	if T==S
		print("Yes")
		break
	S = S[-1]+ S[0:-1]
else:
	print("No")

S = input()
T = input()

for i in range(len(S)):
	if T==S
		print("Yes")
		break
	S = S[-1]+ S[:-1]
else:
	print("No")


S = input()
T = input()

for i in range(len(S)):
	s = S[len(S)]
	S'= S[0:-1]
	if S==T
		print("Yes")
		break
	S = s + S'
else:
	print("No")
		

S = input()
T = input()

for i in range(len(S)):
	if S==T
		print("Yes")
		break
	S = S[-1]+ S[:-1]
else:
	print("No")

S = input()
T = input()

for i in range(len(S)):
	if T==S:
		print("Yes")
		break
	S = S[-1]+ S[0:-1]
else:
	print("No")


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted