Sep-04-2023, 02:55 PM
Aha, slowly I understand the problem.
If a public holiday falls on a weekend, that day or those days can be move to Monday or Tuesday?
Public holidays are generally fixed, except for those depending on the moon, like Chinese New Year, or Easter.
If we had a fixed list of official holidays to start with, that would be easier. Like January 11, February 13, March 14, April 15 ....
Of course, the day of the week will change, so the weekend would need to be pushed to another day.
Still not sure I understand this correctly:
Assume people work Monday to Friday, they will never work more than 5 days in a row! Less if a holiday happens!
I will make a list of holidays, just for fun!
If a public holiday falls on a weekend, that day or those days can be move to Monday or Tuesday?
Public holidays are generally fixed, except for those depending on the moon, like Chinese New Year, or Easter.
If we had a fixed list of official holidays to start with, that would be easier. Like January 11, February 13, March 14, April 15 ....
Of course, the day of the week will change, so the weekend would need to be pushed to another day.
Still not sure I understand this correctly:
Quote:Output a single number - the maximum possible number of consecutive days off for the residents of Flatlandia in the specified year if the weekends are moved so that the number of consecutive working days in this year does not exceed 6.
Assume people work Monday to Friday, they will never work more than 5 days in a row! Less if a holiday happens!
I will make a list of holidays, just for fun!