Cody

Solution 1142828

Submitted on 21 Mar 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
v=vote(821,455); assert(abs(v-0.286833856)<1e-8)

Assertion failed.

2   Fail
v=vote(1548,733); assert(abs(v-0.357299430)<1e-8)

Assertion failed.

3   Fail
v=vote(858,291); assert(abs(v-0.493472585)<1e-8)

Assertion failed.

4   Fail
v=vote(1595,28); assert(abs(v-0.965495995)<1e-8)

Assertion failed.

5   Fail
v=vote(1174,995); assert(abs(v-0.082526510)<1e-8)

Assertion failed.

6   Fail
v=vote(1476,454); assert(abs(v-0.529533679)<1e-8)

Assertion failed.

7   Fail
v=vote(690,333); assert(abs(v-0.348973607)<1e-8)

Assertion failed.

8   Fail
v=vote(1230,896); assert(abs(v-0.157102540)<1e-8)

Assertion failed.

9   Fail
v=vote(533,149); assert(abs(v-0.563049853)<1e-8)

Assertion failed.

10   Fail
v=vote(1941,1758); assert(abs(v-0.049472830)<1e-8)

Assertion failed.

11   Fail
v=vote(1976,339); assert(abs(v-0.707127430)<1e-8)

Assertion failed.

12   Fail
v=vote(2000,0); assert(abs(v-1.000000000)<1e-8)

Assertion failed.

13   Fail
v=vote(398,93); assert(abs(v-0.621181263)<1e-8)

Assertion failed.

14   Fail
v=vote(1659,1028); assert(abs(v-0.234834388)<1e-8)

Assertion failed.

15   Fail
v=vote(1894,961); assert(abs(v-0.326795096)<1e-8)

Assertion failed.

16   Fail
v=vote(1388,874); assert(abs(v-0.227232538)<1e-8)

Assertion failed.

17   Fail
v=vote(1354,1149); assert(abs(v-0.081901718)<1e-8)

Assertion failed.

18   Fail
v=vote(1778,1287); assert(abs(v-0.160195759)<1e-8)

Assertion failed.

19   Fail
v=vote(886,283); assert(abs(v-0.515825492)<1e-8)

Assertion failed.

20   Fail
v=vote(1431,822); assert(abs(v-0.270306258)<1e-8)

Assertion failed.

21   Fail
v=vote(679,544); assert(abs(v-0.110384301)<1e-8)

Assertion failed.

22   Fail
v=vote(1405,1150); assert(abs(v-0.099804305)<1e-8)

Assertion failed.

23   Fail
v=vote(1228,379); assert(abs(v-0.528313628)<1e-8)

Assertion failed.

24   Fail
v=vote(1607,1129); assert(abs(v-0.174707602)<1e-8)

Assertion failed.

25   Fail
v=vote(1265,457); assert(abs(v-0.469221835)<1e-8)

Assertion failed.

26   Fail
v=vote(1885,1572); assert(abs(v-0.090540931)<1e-8)

Assertion failed.

27   Fail
v=vote(1451,1348); assert(abs(v-0.036798857)<1e-8)

Assertion failed.

28   Fail
v=vote(1712,975); assert(abs(v-0.274283588)<1e-8)

Assertion failed.

29   Fail
v=vote(921,494); assert(abs(v-0.301766784)<1e-8)

Assertion failed.

30   Fail
v=vote(1966,354); assert(abs(v-0.694827586)<1e-8)

Assertion failed.

31   Fail
v=vote(1299,536); assert(abs(v-0.415803815)<1e-8)

Assertion failed.

32   Fail
v=vote(1872,874); assert(abs(v-0.363437728)<1e-8)

Assertion failed.

33   Fail
v=vote(1831,1125); assert(abs(v-0.238836265)<1e-8)

Assertion failed.

34   Fail
v=vote(1101,822); assert(abs(v-0.145085803)<1e-8)

Assertion failed.

35   Fail
v=vote(1057,526); assert(abs(v-0.335439040)<1e-8)

Assertion failed.

36   Fail
v=vote(1761,639); assert(abs(v-0.467500000)<1e-8)

Assertion failed.

37   Fail
v=vote(1111,137); assert(abs(v-0.780448718)<1e-8)

Assertion failed.

38   Fail
v=vote(445,425); assert(abs(v-0.022988506)<1e-8)

Assertion failed.

39   Fail
v=vote(670,362); assert(abs(v-0.298449612)<1e-8)

Assertion failed.

40   Fail
v=vote(1009,737); assert(abs(v-0.155784651)<1e-8)

Assertion failed.

41   Fail
v=vote(2000,1); assert(abs(v-0.999000500)<1e-8)

Assertion failed.

42   Fail
v=vote(1504,28); assert(abs(v-0.963446475)<1e-8)

Assertion failed.

43   Fail
v=vote(1821,560); assert(abs(v-0.529609408)<1e-8)

Assertion failed.

44   Fail
v=vote(1521,1373); assert(abs(v-0.051140290)<1e-8)

Assertion failed.

45   Fail
v=vote(823,361); assert(abs(v-0.390202703)<1e-8)

Assertion failed.

46   Fail
v=vote(836,140); assert(abs(v-0.713114754)<1e-8)

Assertion failed.

47   Fail
v=vote(1763,1599); assert(abs(v-0.048780488)<1e-8)

Assertion failed.

48   Fail
v=vote(1288,162); assert(abs(v-0.776551724)<1e-8)

Assertion failed.

49   Fail
v=vote(417,357); assert(abs(v-0.077519380)<1e-8)

Assertion failed.

50   Fail
v=vote(1020,122); assert(abs(v-0.786339755)<1e-8)

Assertion failed.

51   Fail
v=vote(1617,1576); assert(abs(v-0.012840589)<1e-8)

Assertion failed.

52   Fail
v=vote(1493,780); assert(abs(v-0.313682358)<1e-8)

Assertion failed.

53   Fail
v=vote(1868,34); assert(abs(v-0.964248160)<1e-8)

Assertion failed.

54   Fail
v=vote(1452,1240); assert(abs(v-0.078751857)<1e-8)

Assertion failed.

55   Pass
v=vote(2,1); assert(abs(v-0.333333333)<1e-8)

56   Fail
v=vote(584,242); assert(abs(v-0.414043584)<1e-8)

Assertion failed.

57   Fail
v=vote(1610,1196); assert(abs(v-0.147540984)<1e-8)

Assertion failed.

58   Fail
v=vote(1423,1296); assert(abs(v-0.046708349)<1e-8)

Assertion failed.

59   Fail
v=vote(975,479); assert(abs(v-0.341127923)<1e-8)

Assertion failed.

60   Fail
v=vote(1000,80); assert(abs(v-0.851851852)<1e-8)

Assertion failed.

61   Fail
v=vote(1227,1035); assert(abs(v-0.084880637)<1e-8)

Assertion failed.

62   Fail
v=vote(1812,260); assert(abs(v-0.749034749)<1e-8)

Assertion failed.

63   Fail
v=vote(1875,1294); assert(abs(v-0.183338593)<1e-8)

Assertion failed.

64   Fail
v=vote(1882,826); assert(abs(v-0.389955687)<1e-8)

Assertion failed.

65   Fail
v=vote(1401,1348); assert(abs(v-0.019279738)<1e-8)

Assertion failed.

66   Fail
v=vote(1449,494); assert(abs(v-0.491507977)<1e-8)

Assertion failed.

67   Fail
v=vote(1807,512); assert(abs(v-0.558430358)<1e-8)

Assertion failed.

68   Fail
v=vote(1118,432); assert(abs(v-0.442580645)<1e-8)

Assertion failed.

69   Fail
v=vote(1168,184); assert(abs(v-0.727810651)<1e-8)

Assertion failed.

70   Fail
v=vote(1421,980); assert(abs(v-0.183673469)<1e-8)

Assertion failed.

71   Fail
v=vote(1265,270); assert(abs(v-0.648208469)<1e-8)

Assertion failed.

72   Fail
v=vote(1474,1172); assert(abs(v-0.114134543)<1e-8)

Assertion failed.

73   Fail
v=vote(606,556); assert(abs(v-0.043029260)<1e-8)

Assertion failed.

74   Fail
v=vote(1,0); assert(abs(v-1.000000000)<1e-8)

Assertion failed.

75   Fail
v=vote(1543,124); assert(abs(v-0.851229754)<1e-8)

Assertion failed.

76   Fail
v=vote(1935,1383); assert(abs(v-0.166365280)<1e-8)

Assertion failed.

77   Fail
v=vote(1969,1150); assert(abs(v-0.262584162)<1e-8)

Assertion failed.

78   Fail
v=vote(1394,1223); assert(abs(v-0.065341995)<1e-8)

Assertion failed.

79   Fail
v=vote(961,203); assert(abs(v-0.651202749)<1e-8)

Assertion failed.

80   Fail
v=vote(1453,318); assert(abs(v-0.640880858)<1e-8)

Assertion failed.

81   Fail
v=vote(1979,818); assert(abs(v-0.415087594)<1e-8)

Assertion failed.

82   Fail
v=vote(333,302); assert(abs(v-0.048818898)<1e-8)

Assertion failed.

83   Fail
v=vote(1830,1041); assert(abs(v-0.274817137)<1e-8)

Assertion failed.

84   Fail
v=vote(1163,620); assert(abs(v-0.304542905)<1e-8)

Assertion failed.

85   Fail
v=vote(1446,514); assert(abs(v-0.475510204)<1e-8)

Assertion failed.

86   Fail
v=vote(1229,1116); assert(abs(v-0.048187633)<1e-8)

Assertion failed.

87   Fail
v=vote(1590,1215); assert(abs(v-0.133689840)<1e-8)

Assertion failed.

88   Fail
v=vote(990,252); assert(abs(v-0.594202899)<1e-8)

Assertion failed.

89   Fail
v=vote(948,918); assert(abs(v-0.016077170)<1e-8)

Assertion failed.

90   Fail
v=vote(2000,1999); assert(abs(v-0.000250063)<1e-8)

Assertion failed.

91   Fail
v=vote(1077,717); assert(abs(v-0.200668896)<1e-8)

Assertion failed.

92   Fail
v=vote(1296,801); assert(abs(v-0.236051502)<1e-8)

Assertion failed.

93   Fail
v=vote(1807,370); assert(abs(v-0.660082683)<1e-8)

Assertion failed.

94   Fail
v=vote(253,218); assert(abs(v-0.074309979)<1e-8)

Assertion failed.

95   Fail
v=vote(789,452); assert(abs(v-0.271555197)<1e-8)

Assertion failed.

96   Fail
v=vote(1647,203); assert(abs(v-0.780540541)<1e-8)

Assertion failed.

97   Fail
v=vote(1807,15); assert(abs(v-0.983534577)<1e-8)

Assertion failed.

98   Fail
v=vote(1503,929); assert(abs(v-0.236019737)<1e-8)

Assertion failed.

99   Fail
v=vote(1111,266); assert(abs(v-0.613652869)<1e-8)

Assertion failed.

100   Fail
v=vote(1534,564); assert(abs(v-0.462345091)<1e-8)

Assertion failed.