While Portions Remain solution in Clear category for Feed Pigeons by John.Hammell
pigeons_eating = 0
new_pigeons_eating = 0
# Each loop is a minute of pigeons eating.
portions_remaining -= pigeons_eating # Pigeons already eating eat first.
if portions_remaining < 1:
new_pigeons_eating += 1
if portions_remaining <= new_pigeons_eating:
pigeons_eating += portions_remaining
portions_remaining -= new_pigeons_eating
pigeons_eating += new_pigeons_eating
Oct. 4, 2015