Problem 645
Every Day is a Holiday
On planet J, a year lasts for
- At the beginning of the reign of the current Emperor, his birthday is declared a holiday from that year onwards.
- If both the day before and after a day
are holidays, then also becomes a holiday.
Initially there are no holidays. Let
You are given
Find
每天都是休息天
J星球上的一年有
- 每当一名新皇帝登基后,他的生日被宣告为一个新的休息天;
- 如果一年中第
天的前一天和后一天都是休息天,则这一天自动成为休息天。
一开始,这个星球上没有休息天;后来随着一名又一名新皇帝登基,每一天都变成了休息天。假设皇帝们的生日独立地均匀分布在一年中的每一天,并记
已知
求
Gitalking ...