Rounding P92613


Statement
 

pdf   zip

Write a program that reads a real number x0x\ge0 and prints x\lfloor x \rfloor (the floor of xx), x\lceil x \rceil (the ceiling of xx), and the rounding of xx.

Input

Input consists of a real number x0x \ge 0.

Output

Print the floor of xx, the ceiling of xx, and the integer number closer to xx (x\lceil x \rceil if there is a tie).

Public test cases
  • Input

    4.5
    

    Output

    4 5 5
    
  • Input

    0.999999
    

    Output

    0 1 1
    
  • Input

    123345.33
    

    Output

    123345 123346 123345
    
  • Input

    1500000000
    

    Output

    1500000000 1500000000 1500000000
    
  • Information
    Author
    Jordi Petit
    Language
    English
    Translator
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Pascal Python
    User solutions
    C C++ Java Lua Perl PHP Python Ruby Rust Zig