Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
x = 1881;y_correct = 30;
assert(isequal(yearraey(x),y_correct))
n =
5
ans =
4
ans =
5
t =
49 49 49 48 49 48 49 48 49 49 49
y =
-2
|
2 | Pass |
x = 2014;y_correct = 1;
assert(isequal(yearraey(x),y_correct))
n =
5
ans =
4
ans =
5
t =
49 49 49 49 49 48 49 49 49 49 49
y =
1
|
3 | Pass |
x = 2015;y_correct = 0;
assert(isequal(yearraey(x),y_correct))
n =
5
ans =
4
ans =
5
t =
49 49 49 49 49 48 49 49 49 49 49
y =
0
|
4 | Pass |
x = 606;y_correct = 27;
assert(isequal(yearraey(x),y_correct))
n =
5
ans =
1
ans =
3
t =
49 48 48 49 49 49 49 49 49 48
t =
49 48 48 49 49 49 49 48 48 49
y =
27
|
5 | Fail |
x = 6006;y_correct = 71;
assert(isequal(yearraey(x),y_correct))
n =
6
ans =
4
ans =
8
t =
49 48 49 49 49 48 48 49 49 48 49 49 48
t =
48 49 49 48 49 49 48 49 49 48 49 49 48
y =
-2496
|
6 | Fail |
x = 60006;y_correct = 369;
assert(isequal(yearraey(x),y_correct))
n =
8
ans =
1
t =
49 49 49 48 49 48 49 48 48 49 48 49 48 49 49 49
ans =
2
y =
-15
|
7 | Fail |
k=zeros(1,15);
for n=1:15
y=2^n+2;
k(n)=yearraey(y);
end
y_correct=[1 1 5 3 11 7 23 15 47 31 95 63 191 127 383];
assert(isequal(k,y_correct))
n =
1
ans =
4
ans =
5
t =
49 48 49
y =
1
n =
1
ans =
4
ans =
5
t =
49 49 49
y =
1
n =
2
ans =
1
t =
49 48 48 49
ans =
2
y =
-1
n =
2
ans =
4
ans =
5
t =
49 48 48 48 49
y =
-1
n =
3
ans =
1
t =
49 48 48 48 48 49
ans =
2
y =
-1
n =
3
ans =
4
ans =
5
t =
49 48 48 48 48 48 49
y =
-1
n =
4
ans =
1
t =
49 48 48 48 48 48 48 49
ans =
2
y =
-1
n =
4
ans =
4
ans =
5
t =
49 48 48 48 48 48 48 48 49
y =
-1
n =
5
ans =
1
t =
49 48 48 48 48 48 48 48 48 49
ans =
2
y =
-1
n =
5
ans =
4
ans =
5
t =
49 48 48 48 48 48 48 48 48 48 49
y =
-1
n =
6
ans =
1
t =
49 48 48 48 48 48 48 48 48 48 48 49
ans =
2
y =
-1
n =
6
ans =
4
ans =
5
t =
49 48 48 48 48 48 48 48 48 48 48 48 49
y =
-1
n =
7
ans =
1
t =
49 48 48 48 48 48 48 48 48 48 48 48 48 49
ans =
2
y =
-1
n =
7
ans =
4
ans =
5
t =
49 48 48 48 48 48 48 48 48 48 48 48 48 48 49
y =
-1
n =
8
ans =
1
t =
49 48 48 48 48 48 48 48 48 48 48 48 48 48 48 49
ans =
2
y =
-1
|
657 Solvers
819 Solvers
584 Solvers
Given a window, how many subsets of a vector sum positive
743 Solvers
Check that number is whole number
1070 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!