Ad
  • Default User Avatar

    I'm a new programmer, I might be wrong, but some test cases do not follow some of of the given instructions

    I used a greedy approach so solve the problem because you said "A unit of time must be used "as much as possible. It means that the function should not return 61 seconds, but 1 minute and 1 second instead. Formally, the duration specified by of a component must not be greater than any valid more significant unit of time"

    And here you're testing the opposite: "Incorrect answer for seconds=15731080: expected '6 months, 2 days, 1 hour, 44 minutes …' to equal '182 days, 1 hour, 44 minutes and 40 s…'
    Isn't month a more significant unit of time than days if it isn't and I'm wrong what criteria do you use to determine "the more significant unit of time"