Add one second P34279


Statement
 

pdf   zip

html

Write a program that adds one second to a clock time, given its hours, minutes and seconds.

Input

Input consists of three natural numbers h, m and s that represent a clock time, that is, such that h<24, m<60 and s<60.

Output

Print the new clock time defined by h, m and s plus one second in the format “HH:MM:SS”.

Public test cases
  • Input

    11 33 15
    

    Output

    11:33:16
    
  • Input

    19 45 59
    

    Output

    19:46:00
    
  • Input

    12 59 59
    

    Output

    13:00:00
    
  • Input

    3 5 9
    

    Output

    03:05:10
    
  • Input

    0 1 2
    

    Output

    00:01:03
    
  • 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++ Fortran Java Perl PHP Python R