The problem in brief
You roll an ordinary six-sided die three times. What is the probability that at least one of the three rolls shows a six? The answer must be written as a decimal with four digits after the point. It is a warm-up question of the Fizmat AI Olympiad 2025 (Kazakhstan) online selection, and its real lesson is a reflex you will use constantly: when "at least one" appears, look at the opposite event.
How you are scored
One exact answer, worth 10 points. Ours, checked four independent ways in solution.py:
The key idea
"At least one six" is the complement of "no six at all", and "no six" is easy because the rolls are independent. One roll avoids the six with probability ; three independent rolls all avoid it with probability . Therefore
Rounded to four decimals: .
Why is the direct route harder? "At least one six" splits into many cases: exactly one six, exactly two, exactly three, and each case in several positions. The opposite event is a single, clean case. The complement turns an "or" of many overlapping events into an "and" of independent ones, and independent "and"s multiply.
Checking it three other ways
Counting outcomes. The ordered results are equally likely (the classical definition of the statement). The outcomes without any six are , so . Splitting by the number of sixes, outcomes have exactly sixes:
| sixes | 0 | 1 | 2 | 3 | total |
|---|---|---|---|---|---|
| outcomes | 125 | 75 | 15 | 1 | 216 |
and , as expected.
Inclusion-exclusion. Let be "roll is a six". Adding counts the outcomes with two sixes twice and the one with three sixes three times, so we correct:
Simulation. One million simulated triples of rolls give (95 % interval), which contains .
The classic trap
The tempting answer is . It adds the three events as if they could not happen together, but rolling two sixes is counted twice. The figure shows how badly this goes as the number of rolls grows: with 6 rolls the naive rule promises certainty, with 12 rolls a "probability" of 2.

This exact confusion puzzled the Chevalier de Méré in the 17th century and led Pascal and Fermat to lay the foundations of probability theory.
Results
| approach | value | verdict |
|---|---|---|
| complement, | 0.4213 | correct |
| counting 91 of 216 outcomes | 0.4213 | correct, agrees |
| inclusion-exclusion | 0.4213 | correct, agrees |
| Monte Carlo, triples | agrees | |
| adding probabilities, | 0.5000 | wrong: double counting |
| exactly one six only, | 0.3472 | wrong: "at least one" includes two and three sixes |
| 0.0046 | wrong: that is "three sixes" |
What to remember
- "At least one" means "use the complement": .
- Independent events multiply: .
- Probabilities of overlapping events do not add; inclusion-exclusion corrects the double counting.
- The same formula is everywhere in ML: if each of independent models (or test cases, or attempts) succeeds with probability , at least one succeeds with probability . It is why "best of samples" from a language model (pass@n) climbs so fast, and why testing many hypotheses at once produces false discoveries.