Without loops! P48848


Statement
 

pdf   zip

thehtml

Write a program that reads a sequence of natural numbers, and prints each one of the integer numbers reversed.

Input

Input is a sequence of natural numbers.

Output

For each number of the input, print it reversed. Printing reversed numbers, print zeros at the beginning if the were in the end.

Observation

You cannot use any loop, neither for nor while .

Public test cases
  • Input

    123456
    66899
    123000
    0
    21
    4
    

    Output

    654321
    99866
    000321
    0
    12
    4
    
  • Information
    Author
    Jordi Petit
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++
    User solutions
    C++