+ 2

Coding Challenge (Semi-Intermediate)

The Greenify Problem They reproduce asexually. After 1 week of life a female can make 8 offspring a day. Start day 1 with a single mature female, how many greenfly could be there by the end of day 28. Assume : There are no deaths & All offspring are females. Note : At the end of day 1 there will be 9 greenfly(original+ 8 offspring). At the end of day 7 there will be 57 greenfly(original+ 8*7offspring). End of day 8 there will be 129 greenfly(original+ 8*8offspring + 64offspring from daughters of day 1.

8th Oct 2017, 3:08 PM
Aayush Kucheria
Aayush Kucheria - avatar
3 Respostas
+ 1
https://code.sololearn.com/cOfhE9RMZA5a/?ref=app
1st Dec 2017, 2:45 PM
Daniel
Daniel - avatar
9th Oct 2017, 5:44 PM
SomeoneAwesome78
SomeoneAwesome78 - avatar