Cody

Solution 1669250

Submitted on 8 Nov 2018
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
x = 40; y = [40 20 10 4]; z_correct = [1 0 0 0; 0 2 0 0; 0 1 2 0; 0 1 1 3; 0 1 0 5; 0 0 4 0; 0 0 3 3; 0 0 2 5; 0 0 1 8; 0 0 0 10]; assert(isequal(your_fcn_name(x,y),z_correct))

binfmt-support checkroot-bootclean.sh halt killprocs mountall.sh mountnfs-bootclean.sh ondemand rc.local reboot single syslog-ng umountroot bootmisc.sh checkroot.sh hostname.sh monit mountdevsubfs.sh mountnfs.sh procps rcS rpcbind skeleton umountfs urandom checkfs.sh cron hwclock.sh mountall-bootclean.sh mountkernfs.sh networking rc README sendsigs ssh umountnfs.sh x11-common

Assertion failed.

2   Pass
x = 13; y = [40 20 10 4]; z_correct = [1 0 0 0; 0 1 0 0; 0 0 2 0; 0 0 1 1; 0 0 0 4]; assert(isequal(your_fcn_name(x,y),z_correct))

3   Pass
x = 19; y = [10 4]; z_correct = [2 0; 1 3; 0 5]; assert(isequal(your_fcn_name(x,y),z_correct))