#C10567. String Rotation Checker

    ID: 39786 Type: Default 1000ms 256MiB

String Rotation Checker

String Rotation Checker

Given two strings s1 and s2, determine if s2 is a rotation of s1. Formally, if s1 can be represented as xy for some strings x and y, then s2 must be equal to yx to be considered a rotation of s1. For example, if s1 is "waterbottle" and s2 is "erbottlewat", then s2 is a valid rotation of s1.

Note: You should solve this problem using only one call to a built-in substring search method.

inputFormat

The input consists of two lines. The first line contains the string s1 and the second line contains the string s2.

outputFormat

Output 'True' if s2 is a rotation of s1, otherwise output 'False'.## sample

waterbottle
erbottlewat
True