Want to get involved? We're always looking for ideas and content for Weekly Challenges.
SUBMIT YOUR IDEASolution attached.
I have to agree with those that came up with 2022-01-02 as the Date, and I don't think there is any ambiguity in the problem. The problem states that Age 0 occurs on the birthdate, not the following month, and that the frequency for each new generation is 4 months not 5. Also, in July the initial births are included in the population count, so all subsequent births should be added to the population in the month of birth. Just counting on my fingers with July = Month 0, the first litter should arrive in November with a new generation every Mar and July after that. In the solution provided, the first litter doesn't arrive until December, and then every 5 months (May, Oct, …) after that. I think where the solution is flawed is that in the current month it calculates new births, and then passes that as an 'Age 0' population to the iteration for the next month. In reality, there is no Age 0 population, the new births should be added to the population in the birth month, and passed to the next iteration as Age 1 population.
Not very clean but it works.
Same answer - some fiddling about with date boundaries (e.g. do the bunnies start breeding on the first day of Month 4 or during month 4 etc)