mirror of
https://github.com/BreizhHardware/TD-R.git
synced 2026-01-18 16:47:34 +01:00
- Added solutions for DS Félix MARQUET including binomial distribution calculations and function integrations. - Added solutions for TD1 Exo1 including calculations for possible podiums and reward distributions.
18 lines
629 B
R
18 lines
629 B
R
# Une course oppose 20 concurrents, dont Émile
|
|
# a) Combien y-a-t-il de podiums possibles ?
|
|
podiums_total <- factorial(20) / factorial(20 - 3)
|
|
podiums_total
|
|
|
|
# b) Combien y-a-t-il de podiums possibles où Émile est premier ?
|
|
emile_premier <- 1 * (factorial(19) / factorial(17))
|
|
emile_premier
|
|
|
|
# c) Combien y-a-t-il de podiums possibles dont Émile fait partie ?
|
|
emile_podium <- 3 * (factorial(19) / factorial(17))
|
|
emile_podium
|
|
|
|
# d) On souhaite récompenser les 3 premiers en leur offrant un prix identique à chacun. Combien
|
|
# y-a-t-il de distributions de récompenses possibles ?
|
|
distributions <- choose(20, 3)
|
|
distributions
|