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.
Creative way of getting the lowest two values! However,
Array.Sort(array);
is much easier. Nice job regardless!Remove unneccesary line
int modulus = eggs % 8;
and include the modulus in your if statement:You can shorten the code with
time += 5;
Great job! You had a much more concise version of my solution.Expected 9
is incorrect. Your code is working correctly.Raise the second-to-last value to the power of the last value:
2^0 = 1 (anything raised to the power of 0 is one)
Then raise the first number of the array (3) to the power of the result of the previous expression(s):
3^1 = 3
The test case solutions are wrong.