Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
assert(isequal(mod_exp(1000,1000,3),1))
|
2 | Pass |
assert(isequal(mod_exp(1444,2113,104),40))
|
3 | Pass |
assert(isequal(mod_exp(1043,313,23),16))
|
4 | Pass |
assert(isequal(mod_exp(1111,1111,111),1))
|
5 | Pass |
assert(isequal(mod_exp(1531,9898,123),73))
|
6 | Pass |
assert(isequal(mod_exp(1323,7878,12),9))
|
7 | Pass |
assert(isequal(mod_exp(4545,1234,786),429))
|
8 | Pass |
a = [151:160];
b = [311:320];
c = [41:50];
r = [35 22 38 0 35 16 8 16 40 0];
id = randperm(10);
a = a(id);
b = b(id);
c = c(id);
r = r(id);
for i = 1:10
assert(isequal(mod_exp(a(i),b(i),c(i)),r(i)))
end
|
Remove the small words from a list of words.
672 Solvers
First non-zero element in each column
593 Solvers
Back to basics 21 - Matrix replicating
1052 Solvers
Find the largest value in the 3D matrix
1056 Solvers
270 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!