It is wartime, and rationing is taking place in certain regions of your country. Your cities' region is one such region. The city chooses to give everyone the same amount, but in reality, larger people need more food. Chances are, a 200lb man is going to be eating more than that 7lb baby over there. The city, realizing that some people need more food, hires you, their best computer programmer, to solve the issue. They want you to write a program that will divvy up the food appropriately.
Being a smart programmer, you have developed a formula that gives an approximation of how much someone will eat based on their weight.
EAT = (WEIGHT - 1) / 20 + 1
For example, a 124 pound man will eat 7.125 units of food. Knowing that the food is served in packages of 1, and it would be irrational to cut them up, you can round the food units.
Each day, every person eats that many food units. If somebody goes for five days straight with less than that much food per day, they die of starvation.
You will receive population data in this form:
Population*Weight, so if you receive
700*180, you know that their are 700 180lb men in the city. Your city has 100,000 units of food stored away.
For every day your city goes without anyone dying, you get one point. Whoever has the most points wins. Make sure you output how many days your city lasted before someone died.
Here is the input:
Edit: So, the rule "For every day your city goes without anyone dying, you get one point" was terribly abused. Rule change here: if anybody dies, then game over. No more counting.