This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
fam = 5;
chldrn = 1;
y_correct = 20;
assert(isequal(findPresents(fam,chldrn),y_correct))
fam = 4;
chldrn = 4;
y_correct = 0;
assert(isequal(findPresents(fam,chldrn),y_correct))
fam = 20;
chldrn = 6;
y_correct = 266;
assert(isequal(findPresents(fam,chldrn),y_correct))
fam = 100;
chldrn = 33;
y_correct = 6633;
assert(isequal(findPresents(fam,chldrn),y_correct))
Np =
20
Np =
0
Np =
266
Np =
6633
|
284 Solvers
Wind outward from the center ...
67 Solvers
232 Solvers
83 Solvers
Find the maximum number of decimal places in a set of numbers
734 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!