Aurelien, it might be nice if the assert had an error message (eg assert(isequal(y,y_correct),sprintf('%s','Time is ',datestr(now,'hh')))
So, does this only work if you are clicking 'Submit' between 7 and 9 EST?
Nope. Tried at 7:08 AM EST, and got it wrong. What time zone are we dealing with here?
Thanks Richard for the tip. I have now added the assert that you suiggested. In France it seems that you can solve it between 9 and 11 o'clock . I guess that these + 2 hours correspond to the difference with UTC (or GMT) .
That's why I used the NaN on my Prime Time problem that's similar to this one. isequal with NaN will return false. :-)
I had to submit my solution at 4:30 am local time to be between 7 and 9...too sleepy to think about that :-)
Ok!! this IS an argument! ;-)
this can be toped! ;-)
At last, a bright side to having a screaming baby wake you up at an ungodly hour: An honest solution to a Cody problem. :-)
This one is correct anytime.
true! I won't change the test suite because your trick is really nice ;)
Return the largest number that is adjacent to a zero
Project Euler: Problem 6, Natural numbers, squares and sums.
Replicate elements in vectors
What number has this problem?
Create a matrix from a cell
Get the elements of diagonal and antidiagonal for any m-by-n matrix
Find the list of all open files
Combinations without using nchoosek
Cody Computer Part 2 - Get the license number of Cody Computer
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office