Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Good kata! I liked it and solved somewhat in a verbose way, but at least I applied my knowledge about loops and indexes from previous katas so solving these definitely help!
Enabled in this fork
Agreed.
Enabled in this fork
When it comes to language, right there I thinking, thanks.
This comment is hidden because it contains spoiler information about the solution
C# Translation https://www.codewars.com/kumite/66e96891946b0edf0e00f453?sel=66e96891946b0edf0e00f453
Haskell translation
what about the 3 new chickens he bout in the second year
Fun kata, the full extent of the rounding is not obvious at the beginning but overall well designed!
Explanation of the egged(4, 8) example:
Year 1: Ronald starts with 3 chickens. Each chicken lays 300 eggs. So, the total = 3 * 300 = 900 eggs.
Year 2: The 3 chickens from Year 1 are still alive and now lay 240 eggs each (300 - 20%). Ronald also buys 3 new chickens that lay 300 eggs each. So, the total = (3 * 240) + (3 * 300) = 720 + 900 = 1620 eggs.
Year 3: The 3 chickens from Year 1 now lay 192 eggs each (240 - 20%). The 3 chickens from Year 2 lay 240 eggs each, and Ronald buys 3 new chickens that lay 300 eggs each. So, the total = (3 * 192) + (3 * 240) + (3 * 300) = 576 + 720 + 900 = 2196 eggs.
Year 4: The 3 chickens from Year 1 now lay 153 eggs each (192 - 20%). The 3 chickens from Year 2 lay 192 eggs each, the 3 chickens from Year 3 lay 240 eggs each, and Ronald buys 3 new chickens that lay 300 eggs each. So, the total = (3 * 153) + (3 * 192) + (3 * 240) + (3 * 300) = 459 + 576 + 720 + 900 = 2655 eggs.
Explanation of the egged(2, 1) example:
Year 1: Ronald has his initial 3 chickens. Each chicken lays 300 eggs. So, the total = 3 * 300 = 900 eggs.
Year 2: The chickens from the first year have already died (since their lifespan is 1 year).
approved by someone.
python new test frameworks
There's a "bug" in your solution, try checking with input
$num = 696
and see what is wrong.Not a kata issue.
Loading more items...