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 |
votes = [100];
seats = 1;
v_c = 1;
assert(isequal(dHondt(votes,seats),v_c))
|
2 | Pass |
votes = [30,40,60,50];
seats = 1;
v_c = [0,0,1,0];
assert(isequal(dHondt(votes,seats),v_c))
|
3 | Pass |
votes = [428010,363033,330470,75648,71464];
seats = 7;
v_c = [3,2,2,0,0];
assert(isequal(dHondt(votes,seats),v_c))
|
4 | Pass |
votes = [80000,30000,100000,20000];
seats = 8;
v_c = [3,1,4,0];
assert(isequal(dHondt(votes,seats),v_c))
|
5 | Pass |
votes = [100,800,1000,800,600,100];
seats = 9;
v_c = [0,2,3,2,2,0];
assert(isequal(dHondt(votes,seats),v_c))
|
735 Solvers
What is the distance from point P(x,y) to the line Ax + By + C = 0?
210 Solvers
Find the largest value in the 3D matrix
899 Solvers
Criss_Cross_000 : Unique elements in a Square array
9 Solvers
47 Solvers