#P14631. [2018 KAIST RUN Fall] Repetitive Palindrome
[2018 KAIST RUN Fall] Repetitive Palindrome
题目描述
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.
输入格式
The first line contains a string consisting of lowercase alphabets. ()
The second line contains an integer . ()
输出格式
If is a palindrome, print . If not, print .
abc
3
NO
abba
1
YES