Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
filetext = fileread('AztecDiamond.m');
assert(isempty(strfind(filetext,'eval')))
assert(isempty(strfind(filetext,'assign')))
assert(isempty(strfind(filetext,'echo')))
assert(isempty(strfind(filetext,'switch')))
assert(isempty(strfind(filetext,'regexp')))
|
2 | Pass |
d = 1;
assert(isequal(AztecDiamond(d),2))
n =
2
|
3 | Pass |
d = 3;
assert(isequal(AztecDiamond(d),64))
n =
64
|
4 | Pass |
d = 6;
assert(isequal(AztecDiamond(d),2097152))
n =
2097152
|
5 | Pass |
d = 7;
assert(isequal(AztecDiamond(d),268435456))
n =
268435456
|
6 | Pass |
d = 9;
assert(isequal(log2(AztecDiamond(d)),45))
n =
3.5184e+13
|
7 | Pass |
d = 12;
assert(isequal(log2(AztecDiamond(d)),78))
n =
3.0223e+23
|
486 Solvers
Project Euler: Problem 7, Nth prime
522 Solvers
Project Euler: Problem 10, Sum of Primes
707 Solvers
184 Solvers
Determine if input is a perfect number
145 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!