Timer Function
Examples
Example 1:
Input: seconds = 55
Output: "55 seconds"
Example 2:
Input: seconds = 65
Output: "1 minutes, 5 seconds"
Example 3:
Input: seconds = 3805000
Output: "1 months, 2 weeks, 56 minutes, 40 seconds"
Explanation:
Example 1:
Input: seconds = 55
Output: "55 seconds"
Example 2:
Input: seconds = 65
Output: "1 minutes, 5 seconds"
Example 3:
Input: seconds = 3805000
Output: "1 months, 2 weeks, 56 minutes, 40 seconds"
Explanation:
Implement a function timer that takes a single argument seconds (a non-negative integer) and returns a string representing the time in human-readable form.
The function should convert seconds into months, weeks, days, hours, minutes, and seconds (assuming 30 days in a month).
Requirements:
"5 minutes, 0 seconds""2 days, 3 minutes, 10 seconds""2 days, 0 hours, 3 minutes, 10 seconds"Time unit conversions:
3805000 seconds = 1 month + 2 weeks + 0 days + 0 hours + 56 minutes + 40 seconds. Zero units (days, hours) are omitted.
0 <= seconds <= 10^9