This solution is outdated. To rescore this solution, sign in.
my answer is correct.....
@goc3 u can't change or update something not yours, for me no problem because your the leader here, i did not put the inspiration, but that's not good to change it, it's better for u if u delete it not change it.
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
n_str = '11'; assert(isequal(divisible_by_7(n_str),0))
|
2 | Fail |
n_str = '20'; assert(isequal(divisible_by_7(n_str),0))
|
3 | Fail |
n_str = '217'; assert(isequal(divisible_by_7(n_str),0))
|
4 | Fail |
n_str = '231'; assert(isequal(divisible_by_7(n_str),1))
|
5 | Fail |
n_str = '2240'; assert(isequal(divisible_by_7(n_str),0))
|
6 | Fail |
n_str = '1236123'; assert(isequal(divisible_by_7(n_str),1))
|
7 | Fail |
n_str = '123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890';
assert(isequal(divisible_by_7(n_str),0))
|
8 | Fail |
n_str = '1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901';
assert(isequal(divisible_by_7(n_str),0))
|
9 | Fail |
n_str = '2312314263000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000';
assert(isequal(divisible_by_7(n_str),1))
|
10 | Fail |
n_str = '231231420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001';
assert(isequal(divisible_by_7(n_str),0))
|
11 | Fail |
n_str = '84216342000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000000000000000000000021000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001';
assert(isequal(divisible_by_7(n_str),1))
|
Back to basics 6 - Column Vector
809 Solvers
Sum of diagonal of a square matrix
1159 Solvers
Getting the absolute index from a matrix
176 Solvers
366 Solvers
253 Solvers