This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
|
2 | Pass |
%%
% It's going to be a long week
a = [2014 8 4 08 00 0];
weekend(a)
b = 105;
assert(abs(weekend(a)-b)<1e-5)
ans =
105.0000
|
3 | Pass |
%%
a = [2014 08 05 10 23 34];
weekend(a)
b=78.607222;
assert(abs(weekend(a)-b)<1e-5)
ans =
78.6072
|
4 | Pass |
%%
% Half way there
a = [2014 08 06 13 39 15];
b = 51.3458333;
assert(abs(weekend(a)-b)<1e-5)
|
5 | Pass |
%%
a = [2014 08 07 23 12 41];
b = 17.788611;
assert(abs(weekend(a)-b)<1e-5)
|
6 | Pass |
%%
% Counting down the minutes
a = [2014 08 08 16 31 59];
b = 0.466944;
assert(abs(weekend(a)-b)<1e-5)
|
7 | Pass |
%%
a = [2013 08 29 15 59 10];
b = 25.013888;
assert(abs(weekend(a)-b)<1e-5)
|
8 | Pass |
%%
a = [2013 12 30 09 05 9];
b = 103.914166;
assert(abs(weekend(a)-b)<1e-5)
|
9 | Pass |
%%
a = [2012 02 27 10 32 33];
b = 102.457500;
assert(abs(weekend(a)-b)<1e-5)
|
10 | Pass |
%%
% Prohibited functions. List may be added to if more cheats arise
t=evalc('type weekend.m');
badwords={'str2num'};
assert(~any(cellfun(@(y) any(strfind(t,y)),badwords)));
|
397 Solvers
3654 Solvers
How many trades represent all the profit?
460 Solvers
Rotate input square matrix 90 degrees CCW without rot90
323 Solvers
Find out missing number from a vector of 9 elements
208 Solvers