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.
Apologies. copy and paste error.
Fixed.
Sorry for not getting back to you - had a hectic weekend.
I've fixed a bug in my code and your solution should work for all tests now. The last example test case you posted is an old one, so you shouldn't be seeing that. May be a caching issue.
Test cases should be:
Yeah, you will need to adjust your calculation method slightly from the last one, to take into account the relationship between pokemon in the same family.
The last of my basic test cases expects 1500 because you can evolve the Wartortle once, and evolve the Squirtle into a Wartortle and then again into a Blastoise. 3 evolutions = 1500 xp.
The first random test you posted - looks like you won't ever have enough to evolve a Charmeleon so the optimal option for XP would be to transfer them to make enough candy to evolve 3 of your Charmanders. Your Kakuna value is correct, but you can get 1500 XP from your Charmanders.
The last random test - that's a genuine error. The pokedex had a typo, so Wigglytuff wasn't being included in the Jigglypuff family. This is now fixed.
Loved your solution for the simplified one btw!
Thanks for this.
I agree, and have changed the copy. Also added an example that explains the mechanic of accounting for Candy received after evolving a Pidgey.
:)