Cody

# Problem 44077. GJam 2017 Kickstart: Vote (Large)

Solution 1691659

Submitted on 13 Dec 2018 by William
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   Pass
v=vote(821,455); assert(abs(v-0.286833856)<1e-8)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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