Cody

# Problem 43610. nanoseconds passed today

Solution 1122166

Submitted on 13 Feb 2017
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   Fail
x = '24-Oct-2016 20:26:28'; y_correct = 73587999999895.69; assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

now = datetime 24-10-2016 20:26:28 start = datetime 24-10-2016 20:26:28 start = datetime 24-10-2016 00:26:28 start = datetime 24-10-2016 00:00:28 start = datetime 24-10-2016 00:00:00 y = 7.3588e+13

Assertion failed.

2   Fail
x = '24-Oct-2016 20:29:48'; y_correct = 73788000001385.8; assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

now = datetime 24-10-2016 20:29:48 start = datetime 24-10-2016 20:29:48 start = datetime 24-10-2016 00:29:48 start = datetime 24-10-2016 00:00:48 start = datetime 24-10-2016 00:00:00 y = 7.3788e+13

Assertion failed.

3   Fail
x = '31-Oct-2016 13:19:42'; y_correct = 47982000002637.5; assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

now = datetime 31-10-2016 13:19:42 start = datetime 31-10-2016 13:19:42 start = datetime 31-10-2016 00:19:42 start = datetime 31-10-2016 00:00:42 start = datetime 31-10-2016 00:00:00 y = 4.7982e+13

Assertion failed.

4   Fail
x = '04-Jan-1972 07:24:17'; y_correct = 26656999999657.3; assert(abs(nanosecondsPassedToday(x)-y_correct)<0.05)

now = datetime 04-01-1972 07:24:17 start = datetime 04-01-1972 07:24:17 start = datetime 04-01-1972 00:24:17 start = datetime 04-01-1972 00:00:17 start = datetime 04-01-1972 00:00:00 y = 2.6657e+13

Assertion failed.