Cody

Solution 1114820

Submitted on 2 Feb 2017
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
players=4; wishes=[3 5 1 6 3 2 4]; winner=2; assert(isequal(bbgwinner(players, wishes),winner))

Assertion failed.

2   Fail
players=4; wishes=[20 13 7 8 2 16 3]; winner=4; assert(isequal(bbgwinner(players, wishes),winner))

Assertion failed.

3   Fail
players=2 wishes=[2 1]; winner=2; assert(isequal(bbgwinner(players, wishes),winner))

players = 2

Assertion failed.

4   Fail
players=5; wishes=[20 13 7 8 2 16 3 1 2]; winner=4; assert(isequal(bbgwinner(players, wishes),winner))

Assertion failed.

5   Fail
players=5; wishes=[20 13 7 8 2 16 3 3]; winner=5; assert(isequal(bbgwinner(players, wishes),winner))

Assertion failed.

6   Fail
players=20; wishes=123.*[1:39]; winner=17 assert(isequal(bbgwinner(players, wishes),winner))

winner = 17

Assertion failed.

7   Fail
players=30; wishes=[1:59]; winner=18; assert(isequal(bbgwinner(players, wishes),winner))

Assertion failed.

8   Fail
players=30; wishes=[1:54 3 1 2 4]; winner=29; assert(isequal(bbgwinner(players, wishes),winner)) %%

Assertion failed.