Cody

Solution 2181433

Submitted on 29 Mar 2020 by Asif Newaz
  • Size: 44
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
assert(isequal(sec_time(12,'12'),'12:00:12:000 AM'))

2   Pass
assert(isequal(sec_time(1200),'00:20:00:000'))

3   Pass
assert(isequal(sec_time(12000,'24'),'03:20:00:000'))

4   Pass
assert(isequal(sec_time(22000.34,'24'),'06:06:40:340'))

5   Pass
assert(isequal(sec_time(88000.34),'00:26:40:340'))

6   Pass
assert(isequal(sec_time(56734,'12'),' 3:45:34:000 PM'))

7   Pass
assert(isequal(sec_time(556734,'12'),'10:38:54:000 AM'))

8   Pass
assert(isequal(sec_time(.999,'12'),'12:00:00:999 AM'))