Problem:


Score : 100 points

Problem Statement

You are given a string S of length 2 or 3 consisting of lowercase English letters. If the length of the string is 2, print it as is; if the length is 3, print the string after reversing it.

Constraints

The length of S is 2 or 3.

S consists of lowercase English letters.

Input

Input is given from Standard Input in the following format:

S

Output

If the length of S is 2, print S as is; if the length is 3, print S after reversing it.

Sample Input 1

abc

Sample Output 1

cba

As the length of S is 3, we print it after reversing it.

Sample Input 2

ac

Sample Output 2

ac

As the length of S is 2, we print it as is.



Sample input:
abc


Sample output:
cba

Submission status: Runtime Error

Solution code:
s = 'S'

print(len(s))

s_length = len(s)
print(s_length)

if s_length=2
print (s)

else print str[::-1]
str = "S"

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())

for k in range(K):

    if A % 2 != 0:
        
        if A > 1:
            
            A -= 1

    B += round(A/2)
    A -= round(A/2)

    if B % 2 != 0:

        if B > 1:
            
            B -= 1

    A += round(B/2)
    B -= round(B/2)

print(A, B)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())

for k in range(K):

    if A % 2 != 0 and A < 1:
            
        A -= 1

    B += round(A/2)
    A -= round(A/2)

    if B % 2 != 0 and if B < 1:
            
        B -= 1

    A += round(B/2)
    B -= round(B/2)

print(A, B)

Submission status: Runtime Error

Solution code:
a,b,c=map(int,input().split());lis=[a,b]
for i in range(c):
    if lis[i%2]%2==1:lis[i%2]-=1
    lis[(i+1)%2]+=lis[i%2]/2;lis[i%2]/=2
print(int(lis[0]),int(lis[1]))

Submission status: Runtime Error

Solution code:
import numpy as np
import copy

N = int(raw_input().replace("\n", ""))

a_list = []

for i in xrange(N):
    a = int(raw_input().replace("\n", ""))
    a_list.append(a)

input_list = a_list

a_array = np.asarray(a_list)
sum_diffs = []
for start_elm in input_list:
    a_list = copy.deepcopy(input_list)
    target_elm = start_elm
    
    sum_diff = 0
    while len(a_list) >= 1:
        a_list.remove(target_elm)
        if len(a_list) >= 1:
            a_array = np.abs(np.asarray(a_list) - target_elm)
            target_elm_index = np.argmax(a_array)
            target_elm = a_list[target_elm_index]
            sum_diff += a_array[target_elm_index]
        else:
            #sum_diff += np.abs(a_list[0] - target_elm)
            break
    
    sum_diffs.append(sum_diff)

print max(sum_diffs)

Submission status: Runtime Error

Solution code:
a,b,k = list(map(int, input().split()))

def eat(a,b):
    a-= a%2
    b=int(b+a/2)
    a= int(a/2)
    return a,b

for i in range(k):
    if i%2==0:
        a,b = eat(a,b)
    else:
        b,a = eat(b,a)
print(a,b)

Submission status: Runtime Error

Solution code:
S = input()
S_len = len(S)
S_list = list(S)
ans = ''

if S_len == 2:
    print(S)

elif S_len == 3:
    S_reverse = sorted(S, reverse=True)
    for i in range(S_len):
        ans += S_reverse[i]
    pr

Submission status: Runtime Error

Solution code:
A,B,K=map(int,input().split())
for i in range(K):
    if i%2==0:
        if A%2==1:
            A-=1
        B+=int(A/2)
        A=int(A/2)
    else:
        if B%2==1:
            B-=1
        A+=int(B/2)
        B=int(B/2)
print(str(A)+" "+str(B))

Submission status: Runtime Error

Solution code:
text = raw_input()

if len(text) == 2:
    res = text
else:
    res = text[::-1]

print(res)

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())

for i in range(K):
    if A % 2 == 1:
        A -= 1
    A /= 2
    A, B = B + A, A

if K % 2 == 1:
    A, B = B, A
print(int(A), int(B))

Submission status: Runtime Error

Solution code:
A, B, K = map(int, input().split())

for i in range(K):
    if A % 2 == 1:
        A -= 1
    A /= 2
    A, B = B + A, A

if K % 2 == 1:
    A, B = B, A
print(int(A), int(B))

Submission status: Runtime Error

Solution code:
a, b, k = map(int, input().split())

for i, j in enumerate(range(k)):
    if i % 2 == 0:
        if a % 2 == 1:
            a = a - 1
        b = b + a // 2
        a = a // 2
    elif i % 2 == 1:
        if b % 2 == 1:
            b = b - 1
        a = a + b // 2
        b = b // 2

print(a, b)

Submission status: Runtime Error

Solution code:
answer = raw_input()
if len(answer) == 2:
    print(answer)
else:
    print(answer[2] + answer[1] + answer[0])

Submission status: Runtime Error

Solution code:
S = input()

if len(S) == 2:
    print(S)
elif len(S) == 3:
    str_list = list(reversed(S))
    new_str = ''.join(list(reversed(org_str)))
    print(new_str)

Submission status: Runtime Error

Solution code:
S = input()
if len(S)==2:
    print(S)
else:
    print(reverse(S))

Submission status: Runtime Error

Solution code:
#JMD
#Nagendra Jha-4096

 
import sys
import math

#import fractions
#import numpy
 
###File Operations###
fileoperation=1
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile

###Defines...###
mod=1000000007
 
###FUF's...###
def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 
##### Main ####
s=str(input())
if(len(s)==2):
    print(s)
else:
    print(s[::-1])
    
    
#####File Operations#####
if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Submission status: Runtime Error

Solution code:
n = input()

if len(n) == 2:
    print(n)
else if len(n) == 3:
    print(n[::-1])