Time decomposition (1) P37469


Statement
 

pdf   zip

thehtml

Write a program that, given a number of seconds n, prints the number of hours, minutes and seconds represented by n.

Input

Input consists of a natural number n.

Output

Print three natural numbers h, m, s such that 3600h+60m+s=n, with m<60 and s<60.

Public test cases
  • Input

    3661
    

    Output

    1 1 1
    
  • Input

    0
    

    Output

    0 0 0
    
  • Input

    76234
    

    Output

    21 10 34
    
  • Information
    Author
    Jordi Petit
    Language
    English
    Translator
    Carlos Molina
    Original language
    Catalan
    Other languages
    Catalan
    Official solutions
    C++ Java Pascal Python
    User solutions
    Ada C C++ Haskell Java Lua Perl PHP Python R Ruby Rust