#P14631. [2018 KAIST RUN Fall] Repetitive Palindrome
[2018 KAIST RUN Fall] Repetitive Palindrome
Description
You are given a string consisting of lowercase alphabets, and an integer .
Make a new string by concatenating copies of . Determine whether is a palindrome, e.g. is the same backward as forward.
Input Format
The first line contains a string consisting of lowercase alphabets. ()
The second line contains an integer . ()
Output Format
If is a palindrome, print . If not, print .
abc
3
NO
abba
1
YES
京公网安备 11011102002149号