I approached it in the following way, please correct me if I’m wrong.
- 7/40 can be converted into 7*n/40*n, I took n as 3(4 and 5 are too big as the max is sum of 7 in pascals triangle is 128) to try it out, 21/120 so sum of all the combinations should be 120 and
- Since we know 7 is the total times the coined flipped, we can get the Combination list using pascal’s triangle and get the answer by solving for the sum (120)
21+35+35+21+7+1=120
Which is possible only when you have k=2
