Description

Pari has a friend who loves palindrome numbers. A palindrome number is a number that reads the same forward or backward. For example 12321, 100001 and 1 are palindrome numbers, while 112 and 1021 are not.

Pari is trying to love them too, but only very special and gifted people can understand the beauty behind palindrome numbers. Pari loves integers with even length (i.e. the numbers with even number of digits), so she tries to see a lot of big palindrome numbers with even length (like a 2-digit 11 or 6-digit 122221), so maybe she could see something in them.

Now Pari asks you to write a program that gets a huge integer n from the input and tells what is the n-th even-length positive palindrome number?

Input

The only line of the input contains a single integer n (1 ≤ n ≤ 10100 000).

Output

Print the n-th even-length palindrome number.

Sample Input

Input
1
Output
11
Input
10
Output
1001

水题!!

正反各输出一次。

附AC代码:

 #include<iostream>
#include<cstring>
#include<cstdio>
using namespace std; int main(){
string s;
while(cin>>s){
cout<<s;
for(int i=s.size()-;i>=;i--){
cout<<s[i];
}
cout<<endl;
}
return ;
}

E - Lovely Palindromes的更多相关文章

  1. Codeforces Round #360 (Div. 2) B. Lovely Palindromes 水题

    B. Lovely Palindromes 题目连接: http://www.codeforces.com/contest/688/problem/B Description Pari has a f ...

  2. codeforces 688B B. Lovely Palindromes(水题)

    题目链接: B. Lovely Palindromes time limit per test 1 second memory limit per test 256 megabytes input s ...

  3. CodeForces 688B Lovely Palindromes (水题回文)

    题意:给一个数n,让你找出长度为偶数,并且是第 n 个回文数. 析:你多写几个就知道了,其实就是 n,然后再加上n的逆序,不过n有点大,直接用string 好了. 代码如下: #include < ...

  4. CF688B Lovely Palindromes 题解

    Content 输入一个数 \(n\),输出第 \(n\) 个偶数位回文数. 数据范围:\(1\leqslant n\leqslant 10^{10^5}\). Solution 一看这吓人的数据范围 ...

  5. cf688B-Lovely Palindromes

    http://codeforces.com/problemset/problem/688/B B. Lovely Palindromes time limit per test 1 second me ...

  6. 套题 codeforces 360

    A题:Opponents 直接模拟 #include <bits/stdc++.h> using namespace std; ]; int main() { int n,k; while ...

  7. UVA - 11584 Partitioning by Palindromes[序列DP]

    UVA - 11584 Partitioning by Palindromes We say a sequence of char- acters is a palindrome if it is t ...

  8. hdu 1318 Palindromes

    Palindromes Time Limit:3000MS     Memory Limit:0KB     64bit                                         ...

  9. dp --- Codeforces 245H :Queries for Number of Palindromes

    Queries for Number of Palindromes Problem's Link:   http://codeforces.com/problemset/problem/245/H M ...

随机推荐

  1. ffmpeg rtmp 推流错误WriteN, RTMP send error 10053 10038

    利用ffmepg推264流到rtmp服务端出现错误WriteN, RTMP send error 10053,具体如下图所示. 图1推流到rtmp服务错误 原因是视频流缺少SPS,PPS信息,加上这两 ...

  2. quick-cocos2d-x教程12:实现文本和password输入界面

    用户输入账号和password输入是常见工能,如今用editbox来实现username和password输入.可是这个商业项目上常见功能,网上却没有找到教程.我就一步一步的实现.代码例如以下: fu ...

  3. EhCache Monitor的使用

    1.在http://ehcache.org/documentation/monitor.html#Installation_And_Configuration下载ehcache-monitor-kit ...

  4. Android开源git40个App源代码

    (JamsMusicPlayer)非常棒的音乐播放器(new)   (F8)日程安排的软件   (Conversations)基于XMPP的应用   (Bitocle)能够在手机上查看自己github ...

  5. Java RESTful 框架

    [转载] 最好的8个 Java RESTful 框架 - 2015 Top 8 Java RESTful Micro Frameworks – Pros/Cons - 2017 Restlet - f ...

  6. switch多分枝语句

    package lianxi; //switch多分枝语句 import java.util.Scanner; public class GetSwitch { public static void ...

  7. UVA 10951 - Polynomial GCD(数论)

    UVA 10951 - Polynomial GCD 题目链接 题意:给定两个多项式,求多项式的gcd,要求首项次数为1,多项式中的运算都%n,而且n为素数. 思路:和gcd基本一样,仅仅只是传入的是 ...

  8. 【C++基础学习】Vector

    代码练习: #include <iostream> #include <vector> using namespace std; int main(){ cout <&l ...

  9. 【C++基础学习】成员对象与对象数组

    第一部分 对象成员与对象数组 从一个简单的例子开始说起,首先定义一个Coordinate的类,里面有两个公有的成员变量m_iX和m_iY,分别代表横坐标和纵坐标. 接下来,定义一个对象数组cood和一 ...

  10. linux 脚本统计代码行数

    由于实际需求,需要统计开源产品的代码行数,so,以下命令统计*.c的行数. .h,.java  .同理 find . -name *.c|xargs wc -l