Cody

# Problem 3054. Chess ELO rating system

Solution 2120873

Submitted on 7 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
players = 1000; result = 1; assert(isequal(algo400(players,result),1400))

Undefined function 'sump' for input arguments of type 'double'. Error in algo400 (line 6) y = sump(players + add)/numel(players); Error in Test1 (line 3) assert(isequal(algo400(players,result),1400))

2   Fail
players = 1000; result = 0.5; assert(isequal(algo400(players,result),1000))

Undefined function 'sump' for input arguments of type 'double'. Error in algo400 (line 6) y = sump(players + add)/numel(players); Error in Test2 (line 3) assert(isequal(algo400(players,result),1000))

3   Fail
assert(isequal(algo400([2000 2000],[0.5 0.5]),2000))

Undefined function 'sump' for input arguments of type 'double'. Error in algo400 (line 6) y = sump(players + add)/numel(players); Error in Test3 (line 1) assert(isequal(algo400([2000 2000],[0.5 0.5]),2000))

4   Fail
players = [2000 2000]; result = [1 1]; assert(isequal(algo400(players,result),2400))

Undefined function 'sump' for input arguments of type 'double'. Error in algo400 (line 6) y = sump(players + add)/numel(players); Error in Test4 (line 3) assert(isequal(algo400(players,result),2400))

5   Fail
players = [2000 2000]; result = [0.5 1]; assert(isequal(algo400(players,result),2200))

Undefined function 'sump' for input arguments of type 'double'. Error in algo400 (line 6) y = sump(players + add)/numel(players); Error in Test5 (line 3) assert(isequal(algo400(players,result),2200))

6   Fail
players = [2000 2100 2200 2300]; result = [1 0.5 1 0.5]; assert(isequal(algo400(players,result),2350))

Undefined function 'sump' for input arguments of type 'double'. Error in algo400 (line 6) y = sump(players + add)/numel(players); Error in Test6 (line 3) assert(isequal(algo400(players,result),2350))

7   Fail
players = 1000; result = 1; assert(isequal(algo400(players,result),1400))

Undefined function 'sump' for input arguments of type 'double'. Error in algo400 (line 6) y = sump(players + add)/numel(players); Error in Test7 (line 3) assert(isequal(algo400(players,result),1400))

8   Fail
players = [1399 1280 2166 1534 1768 1791 1540]; result = [1 1 0 1 1 0 1]; assert(isequal(round(algo400(players,result)),1811))

Undefined function 'sump' for input arguments of type 'double'. Error in algo400 (line 6) y = sump(players + add)/numel(players); Error in Test8 (line 3) assert(isequal(round(algo400(players,result)),1811))

9   Fail
players = [2000 2100 2200 2300]; result = [0.5 0.5 0.5 0.5]; assert(isequal(algo400(players,result),2150))

Undefined function 'sump' for input arguments of type 'double'. Error in algo400 (line 6) y = sump(players + add)/numel(players); Error in Test9 (line 3) assert(isequal(algo400(players,result),2150))

10   Fail
players = [2772 2768 2877 2805 2787 2772 2768 2877 2787 2805]; result = [1 1 1 1 1 1 1 0.5 0.5 0.5]; assert(isequal(round(algo400(players,result)),3082))

Undefined function 'sump' for input arguments of type 'double'. Error in algo400 (line 6) y = sump(players + add)/numel(players); Error in Test10 (line 3) assert(isequal(round(algo400(players,result)),3082))

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!