Changes of base P56549


Statement
 

pdf   zip

thehtml

Use recursion in order to write a program that prints every given number in binary, octal and hexadecimal notation.

Input

Input consists of several natural numbers.

Output

For every given number, print its binary, octal and hexadecimal notation. Follow the format of the example.

Public test cases
  • Input

    9
    12
    1024
    0
    1000000000
    

    Output

    9 = 1001, 11, 9
    12 = 1100, 14, C
    1024 = 10000000000, 2000, 400
    0 = 0, 0, 0
    1000000000 = 111011100110101100101000000000, 7346545000, 3B9ACA00
    
  • Information
    Author
    Jordi Petit
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Python
    User solutions
    C C++ Java Python