Question 1
In one term of an academic program, we have days. Students have to earn at least credits during these days to remain in the program. There are two ways to earn points — completing practical tasks and attending lessons. For each task, a student earns points, and for each lesson, a student earns points.
Practical tasks are unlocked “each week” as the term goes on: the first task is unlocked on day 1 (and can be completed on any day from 1 to ), the second task is unlocked on day 8 (and can be completed on any day from 8 to ), the third task is unlocked on day 15, and so on.
Every day from 1 to , there is a lesson which can be attended by the students of the program. And every day, students choose whether to study or to rest the whole day. When a student decides to study, he or she attends a lesson and can complete no more than 2 tasks, which are already unlocked and not completed yet. If a student rests the whole day, he skips a lesson and ignores tasks.
Students naturally wants to have as many days off as possible, i. e. they want to maximize the number of rest days. Let's calculate this maximum.
As an example: if and , then by studying only on day 42 we attend a lesson gives (1 point), and can solve 2 out of 6 available tasks to get another 20 points. This is necessary and sufficient, and leads to 99 rest days.
Based on the above data, answer the given subquestions.
