Deer Me
Time limit1sMemory limit512 MB
Simulate a county's deer herd for N years using yearly birth, survival, and harvest rates, rounding each year's total to the nearest integer.
- Level
Easy3 of 10
- Topics
- Simulation, Implementation
- Solved
- No attempts yet
Problem
The Forest & Game Commission wants to estimate the deer population of one county for the next 15 years. A recent survey found 9,395 deer living in the county now. Of these, 1,703 are adult males and 3,714 are adult females. Adults are deer over two years of age. The remaining deer are fawns (under two years of age): 2,058 are male and 1,920 are female. No other figures are available, so it is assumed that 2/3 of the fawns are newborns (under one year of age).
Data collected over the past several years shows how the herd changes from year to year. For every 100 females in the herd, 150 fawns are born. Of the fawns born, 52% are male, and 55% survive to one year of age. Of those that reach one year of age, 60% survive to become adults. The natural survival rate of adults is 90%.
The commission allows an annual harvest of 75% of adult males (that is, 75% of adult males are removed by hunting). Each year's estimate is rounded to the nearest integer, and that integer is used as the input for the next year.
Input
The input is a single line containing one positive integer N, where N ≤ 74.
Output
Print a table that estimates the deer population for the next N years.