This question already has an answer here:
- Decimal Time of Day Conversion 13 answers
For some part of history people in France used a decimal clock. with the clock having 10 hour day, 100 minutes an hour and 100 seconds per minute. Though this clock simplified calculations a bit the idea wasn't appreciated by most of the world which used our current 24 hour, 60 minute hour, and 60 second minute. And hence decimal time was scrapped
However this time system does have its merits too. It is very useful for calculating time based efficiency easily aligns with our decimal measurement system and etc.
So given an Input as a string which is in standard HH:MM:SS format (regular time) we have to convert it to decimal time and output the exact decimal time on screen
- You will be provided with a string of the 24 hour format with colon separator between different time units Eg: 06:00:00,18:00:00
- Your output must be a string of decimal time of the format as in 02:50:00, 07:50:00.
- Note that separators in the output do not matter. Eg: 02:50:00 is a valid output and so is 02#50#00 (replacing separator colons with hashtags does not change output validity)
- No use of any time related module is allowed. You will be provided input as specified in Rule 1 (#include, import datetime etc. is not allowed)
Who is the winner:
The one whose code is smallest wins
Sample input ----> Output
00:00:00 changes to 00:00:00 06:00:00 changes to 02:50:00 06:30:00 changes to 02:70:83 12:00:00 changes to 05:00:00 18:00:00 changes to 07:50:00 18:30:00 changes to 07:70:83