Cody

# Problem 62. Elapsed Time

Solution 1750995

Submitted on 14 Mar 2019 by Zain Faruqi
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
d1 = '2010/12/14 12:00:00'; d2 = '2010/12/17 17:06:00'; elapsed = 77.1; assert(abs(elapsed_time(d1,d2) - elapsed) < 1e-6)

s1 = 0 s2 = 0 s3 = 3 s4 = 5 s5 = 6 s6 = 0

2   Pass
d1 = '2010/12/14 12:00:00'; d2 = '2010/12/14 12:00:01'; elapsed = 1/3600; assert(abs(elapsed_time(d1,d2) - elapsed) < 1e-6)

s1 = 0 s2 = 0 s3 = 0 s4 = 0 s5 = 0 s6 = 1

3   Pass
d1 = '1924/1/7 12:45:00'; d2 = '2010/12/14 17:06:00'; elapsed = 762076.35; assert(abs(elapsed_time(d1,d2) - elapsed) < 1e-6)

s1 = 86 s2 = 11 s3 = 7 s4 = 5 s5 = 39 s6 = 0

4   Pass
d1 = '2010/12/14 12:00:00' d2 = '2010/12/14 13:06:36' elapsed = 1.11; assert(abs(elapsed_time(d1,d2) - elapsed) < 1e-6)

d1 = '2010/12/14 12:00:00' d2 = '2010/12/14 13:06:36' s1 = 0 s2 = 0 s3 = 0 s4 = 1 s5 = 6 s6 = 36