Codeforces Lovely Palindromes

#include<bits/stdc++.h>
using namespace std;

typedef long long LL;
typedef unsigned long long ull;

int main()
{
    ios_base::sync_with_stdio(false);
    string s;
    while(cin >> s)
    {
        cout << s;

        for(LL i=s.length()-1; i>=0; i--) cout << s[i];
        //cout << s << "\n";
        cout << "\n";
    }

    return 0;
}

Comments

Popular posts from this blog

SPOJ-CMG - Collecting Mango

LightOJ 1009 - Back to Underworld

LeetCode Palindrome Number