I have been recently told to read an entire physics textbook by the new year (true story, unfortunately). I need your help to determine what chapters I should read each day. This is where you come in.
- Two dates, in any format. The second date will always be later than the first.
- A list of chapter numbers. This comma-separated list can contain single chapters (
12) or inclusive ranges (
- A list of weekdays (represented by the first two letters of the name:
Monday -> Mo) to exclude from the schedule. Ex.
Output will be a newline-separated list of dates and chapter numbers (see format below). The chapters should be evenly distributed over all days in the range, excluding the weekdays provided. If the chapters do not distribute evenly, have the days with lower amounts of chapters at the end of the period of time. Dates in output can be in a different format than input. Days with no chapters can be ommited, or just have no chapters with it.
9/17/2015 9/27/2015 1-15 Tu
9/17/2015: 1 2 9/18/2015: 3 4 9/19/2015: 5 6 9/20/2015: 7 8 9/21/2015: 9 10 9/23/2015: 11 9/24/2015: 12 9/25/2015: 13 9/26/2015: 14 9/27/2015: 15