Cody

Problem 42821. Polygon division

Solution 2170145

Submitted on 22 Mar 2020 by Asif Newaz
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   Pass
filetext = fileread('polydiv.m'); assert(isempty(strfind(filetext,'str')))

2   Pass
n = 3; w_correct = 1; assert(isequal(polydiv(n),w_correct))

a = 1

3   Pass
n = 4; w_correct = 2; assert(isequal(polydiv(n),w_correct))

a = 2

4   Pass
n = 5; w_correct = 5; assert(isequal(polydiv(n),w_correct))

a = 5

5   Pass
n = 8; w_correct = 132; assert(isequal(polydiv(n),w_correct))

a = 132

6   Pass
n = 11; w_correct = 4862; assert(isequal(polydiv(n),w_correct))

a = 4862

7   Pass
n = 15; w_correct = 742900; assert(isequal(polydiv(n),w_correct))

a = 742900