📜 ⬆️ ⬇️

Problem number 151

The printing house performs 16 tasks every week, and each task requires a sheet of special photo paper of A5 size.

Every Monday the master gets a new A1 sheet.

He cuts the sheet in half, getting two sheets of A2 format. Then it cuts only one of them again, gets two sheets of A3, and so on, until it receives the format A5 required for the first print.
')
All the other sheets are stuffed into the bedside table.



Before the start of each next task, he takes one random sheet from the bedside table. If the sheet is in A5 format, then it is immediately used. Otherwise, the procedure of cutting in half is repeated until the first suitable sheet is obtained, and the remnants are again removed into the nightstand.

If you exclude the first and last print of the week, find the expected number of times (every week) when the wizard finds exactly one sheet of paper in the bedside table.

Answer round up to 6 digits after the comma and report in the format x.xxxxxx

Source: https://habr.com/ru/post/38840/


All Articles