Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- s=input()
- s1=input()
- step = int()
- if s==s1:
- print(0)
- elif len(s) == len(s1):
- while s!= s1 and step != len(s1):
- step+=1
- s = s[-1:]+s[:-1]
- if step !=len(s):
- print(step)
- else:
- print(-1)
- else:
- print(-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement