Cody

Solution 2115179

Submitted on 2 Feb 2020
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
votes = [100]; seats = 1; v_c = 1; assert(isequal(dHondt(votes,seats),v_c))

Assertion failed.

2   Fail
votes = [30,40,60,50]; seats = 1; v_c = [0,0,1,0]; assert(isequal(dHondt(votes,seats),v_c))

Assertion failed.

3   Fail
votes = [428010,363033,330470,75648,71464]; seats = 7; v_c = [3,2,2,0,0]; assert(isequal(dHondt(votes,seats),v_c))

Assertion failed.

4   Fail
votes = [80000,30000,100000,20000]; seats = 8; v_c = [3,1,4,0]; assert(isequal(dHondt(votes,seats),v_c))

Assertion failed.

5   Fail
votes = [100,800,1000,800,600,100]; seats = 9; v_c = [0,2,3,2,2,0]; assert(isequal(dHondt(votes,seats),v_c))

Assertion failed.

Suggested Problems