Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, in decimal hours, separates them. Assume d2 is always later than d1.
Example:
Input d1 = '2010/12/14 12:00:00' Input d2 = '2010/12/14 13:06:36' Output elapsed is 1.11
The testsuite input does not following the input format string.
Having a hard time with the test suite regarding the number of hours in one year. I think it should be 8 765.81277h/y
The test suite doesnt follow. it should be double digit days and month, not single digits according to his descrption
having problems with the test suite especially test no 3
having problems with test no 3 of the test suite,why?
It's a fun problem
the test suits are all passed , but the mathworks net tells its wrong.
and the size is '-1'.
i use the datenum function.
I use format bank to get 2 decimal output, anyone has a better idea?
using existing functions makes this trick easy
This test program is wrong.To judge a leap year, you need to calculate if the following condition is satisfied mod(year,4)==0 & mod(year,100)~=0 & mod(year,400)==0. However, this team only count those years that mod(year,4)==0
why this function returns an error it works perfectly on my pc
the test suits are all passed , but the mathworks net tells its wrong. and the size is '-1'. i use the datenum function.
The value of d1 in Test Suite #3 is not to spec (one digit for the month).
Love the little "if" in the end ! :D
doesn't work any longer
What is the next step in Conway's Life?
422 Solvers
4105 Solvers
Find the largest value in the 3D matrix
898 Solvers
Convert a vector into a number
442 Solvers
209 Solvers