Beta

Blue discs

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

More By Author:

Check out these other kata created by HDdo

Stats:

CreatedFeb 26, 2018
PublishedFeb 26, 2018
Warriors Trained275
Total Skips119
Total Code Submissions280
Total Times Completed6
Java Completions6
Total Stars5
% of votes with a positive feedback rating67% of 3
Total "Very Satisfied" Votes2
Total "Somewhat Satisfied" Votes0
Total "Not Satisfied" Votes1
Total Rank Assessments4
Average Assessed Rank
5 kyu
Highest Assessed Rank
1 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • HDdo Avatar
Ad