hackerrank.com
Practice>Python>Date and Time>Time Delta
건이두
2019. 2. 17. 08:14
728x90
Time Delta
Problem link : https://www.hackerrank.com/challenges/python-time-delta/problem
Difficulty : Medium
Tip
- First of all, we should convert timestamp string to datetime
- We should write a format string, to describe the meaning of timestamp string
- For example, 'Sun' means the Sunday, to convert 'Sun' to Sunday(as a part of datetime), format string should be '%a'
- datetime is good class to convert whole timestamp :)
- total_seconds() is one of method, to print datetime as seconds
- Don't forget that we should print absolute value, so there is no minus value
Solution
728x90