P8748 [Lanqiao Cup 2021 NOI Qualifier B] Time Display

Description

Xiao Lan is working with a friend to develop a website that displays time. On the server, the friend has already obtained the current time as an integer, whose value is the number of milliseconds that have elapsed from 00:00:00 on January 1, 1970 to the current moment. Now, Xiao Lan needs to display this time on the client. Xiao Lan does not need to display the year, month, or day, only the hour, minute, and second. Milliseconds also do not need to be displayed and should be directly discarded. Given a time represented by an integer, output the corresponding hour, minute, and second for this time.

Input Format

Input consists of one line containing one integer, representing the time.

Output Format

Output the current time in hour, minute, and second format, in the form $\mathrm{HH}:\mathrm{MM}:\mathrm{SS}$, where $\mathrm{HH}$ represents the hour with a value from $0$ to $23$, $\mathrm{MM}$ represents the minute with a value from $0$ to $59$, and $\mathrm{SS}$ represents the second with a value from $0$ to $59$. If the hour, minute, or second is less than two digits, pad it with a leading `0`.

Explanation/Hint

For all test cases, the given time is a positive integer not exceeding $10^{18}$. Lanqiao Cup 2021 First Round Provincial Contest, Group B, Problem F. Translated by ChatGPT 5