Time limit
1000 ms
Memory limit
262144 kB
Source
Codeforces Round #360 (Div. 2)
Tags
constructive algorithms math *1000
Editorial
Announcement (en) Tutorial (en)
Descriptions:

Lovely Palindromes

CodeForces - 688B