Question:
In a school, the Kindergarten students are supposed to repeat a word 5 times. For example, if the word is “dancing”, they will have to say dancing dancingdancingdancingdancing.
Write a program to accept the string(word) as input from the user and also get the X and the Y position of the character as input from the user. If the Xth and Yth position characters are the same then print it as “Same” else “Not Same”.
[Example: if the input is dancing, and if the x is 3 and y is 10 then the output will be “Same”. The students keep on repeating the word for 5 times, the 3rd position character is “n” and the 10th position character is also “n” so the output is the same]
Sample Input 1:
Dancing
3
10
Sample output 1:
Same
Sample Input 2:
love
2
12
Sample output 2:
Not Same