Ant colony
Ants are amazing. They are hard-working, very organized, and construct amazing habitats.
Knowing that you’ve decided to start keeping an ant colony in an aquarium at home.
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fb4fa2a6c-de7a-4b52-8642-6ef3a027a71e%2Fsmall-ants.jpg?table=block&id=dbf84908-812a-4a02-85ff-acf095f73f5b&cache=v2)
You’ve obtained
n
ants from a friend of yours and you’re wondering how many ants will there be in y
years. Your friend tells you that the colony size increases by p
percent every year. So, you decide to do the calculation for each of the next n
years and see what the progress will look like.The program will receive 3 integers. The number of ants your friend gave you
n
, the number of years you’re interested y
, and the growth percentage p
.Input | Output |
150
8
10 | 165
181.5
199.65
219.615
241.5765
265.73415
292.307565
321.5383215 |
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB