i get the same solution but the test says false
for test 9, 11
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
%%
x = 6;
y_correct = [1 3];
assert(isequal(cantor_index2rational(x),y_correct))
y =
1 3
|
2 | Pass |
%%
x = 385;
y_correct = [22 7];
assert(isequal(cantor_index2rational(x),y_correct))
y =
22 7
|
3 | Pass |
%%
x=108924;
y_correct = [355 113];
assert(isequal(cantor_index2rational(x),y_correct))
y =
355 113
|
4 | Pass |
%%
x = 206;
y_correct = [5 16];
assert(isequal(cantor_index2rational(x),y_correct))
y =
5 16
|
5 | Pass |
%%
x = 2060;
y_correct = [21 44];
assert(isequal(cantor_index2rational(x),y_correct))
y =
21 44
|
6 | Pass |
%%
x = 20604;
y_correct = [103 101];
assert(isequal(cantor_index2rational(x),y_correct))
y =
103 101
|
7 | Pass |
%%
x = 20704;
y_correct = [3 201];
assert(isequal(cantor_index2rational(x),y_correct))
y =
3 201
|
8 | Pass |
%%
x = 205704;
y_correct = [58 584];
assert(isequal(cantor_index2rational(x),y_correct))
y =
58 584
|
9 | Fail |
%%
x = 2085704;
y_correct = [200 1843];
assert(isequal(cantor_index2rational(x),y_correct))
y =
1.0e+03 *
0.2000 1.8430
|
10 | Pass |
%%
x = 20851704;
y_correct = [4408 2051];
assert(isequal(cantor_index2rational(x),y_correct))
y =
4408 2051
|
11 | Fail |
%%
x = 290851704;
y_correct = [23437 683];
assert(isequal(cantor_index2rational(x),y_correct))
y =
1.0e+04 *
2.3437 0.0683
|
Find the two most distant points
1628 Solvers
Find state names that start with the letter N
598 Solvers
Cell Counting: How Many Draws?
581 Solvers
Change the sign of even index entries of the reversed vector
296 Solvers
327 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!