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.
Yeah, I didn't like that either, though I guess it is a valid challenge to have slightly strange specifications, as that happens sometimes in programming.
This would be interesting with arbitrary amounts (like 300, 12, and 6). null could be returned if it was impossible (like with 3, 18, and 4).
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Here's a challenging one:
Magical loops
Channels
A wizard can open a mana channel to send mana to another wizard. Rules for channels:
Prisms
Each channel has zero or more ethereal prisms which transmit and multiply mana until they're used up. Rules for prisms:
Loops
A wizard can increase their mana by relaying mana through a sequence of wizards until it gets back to the starting wizard. Rules for loops:
Your task
Wizards are allowed to hire assistants a little over one hour before solo battles, which is only time enough to start off zero or more loops simultaneously, but not time enough to feed the mana gained from one loop into a second round of loops.
You've been hired! Find a set of loops that maximizes the amount of mana your wizard will have for their upcoming battle.
Inputs
You'll be given:
Output
Return the total mana sent through each channel.
To send 2.5 mana from Jim to Sally to Stan to Jim and 3.5 mana from Jim to Stan to Sally to Jim, you might, with the right set of channel values, return (the format for each element is [mana, from, to]):
If there is more than one way to get the maximum resulting mana, any maximized solution is fine. Your solution will be checked for two qualities:
Not putting a comma in front of 'and' is the work of SATAN!
This comment is hidden because it contains spoiler information about the solution