Beta
Blue discs
6HDdo
Description:
Arranged probability
If a box contains twenty-one coloured discs, composed of fifteen blue discs and six red discs, and two discs were taken at random, it can be seen that the probability of taking two blue discs, P(BB) = (15/21)×(14/20) = 1/2.
The next such arrangement, for which there is exactly 50% chance of taking two blue discs at random, is a box containing eighty-five blue discs and thirty-five red discs.
By finding the first arrangement to contain over x(x will be given as the parameter) discs in total, determine the number of blue discs that the box would contain.
Powered by Project Euler
Fundamentals
Similar Kata:
Stats:
Created | Feb 26, 2018 |
Published | Feb 26, 2018 |
Warriors Trained | 275 |
Total Skips | 119 |
Total Code Submissions | 280 |
Total Times Completed | 6 |
Java Completions | 6 |
Total Stars | 5 |
% of votes with a positive feedback rating | 67% of 3 |
Total "Very Satisfied" Votes | 2 |
Total "Somewhat Satisfied" Votes | 0 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 4 |
Average Assessed Rank | 5 kyu |
Highest Assessed Rank | 1 kyu |
Lowest Assessed Rank | 7 kyu |