Problem 56493. Cricket - How Much More to Beat Bradman?
Sir Don Bradman famously needed only 4 runs in his final innings to retire with an average of 100. Out for a duck, he ended instead with the legendary figure of 99.94.
Given a player's career average and total runs scored, calculate how many runs they would need to score in one final innings to bring their career average to 100 (assuming, for safety, that they will be dismissed in this final innings).
Batting average is defined as total runs divided by number of dismissals (ie number of innings - number of not-outs).
For example, Bradman himself scored 6996 runs at an average of 99.94. Given one more innings, he would need to score 104 runs, to get a total of 7100, for an average of 7100/(71 dismissals) = 100. (This makes sense - he still needs the 4 from the previous innings, plus another 100 for the new one.)
Chris Martin, on the other hand, scored 123 runs at an average of 2.36. Given one more innings to get his average to 100, he would need to score a mere 5177 runs.
% The Don
r = beatthedon(99.94,6996)
r =
104
% Chris Martin
r = beatthedon(2.36,123)
r =
5177
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers50
Suggested Problems
-
Back to basics 21 - Matrix replicating
1531 Solvers
-
3841 Solvers
-
283 Solvers
-
206 Solvers
-
Cricket - Sort Batters by Distance Run
76 Solvers
More from this Author22
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!