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.
It is ok. After clicking the Attemp button, you will see the output on the left side. The first part of the output is Test Results. The first table is your results. Below, you will see another table but the content is the same: just check the upper part of the second table, you will see Results: Actual (Top 100 of 348) |
Results: Expected | Diff . If you click blue colored Results: Expected, you will see the desired results, and the Diff section shows the differences between your results and desired ones.
Hello.
After clicking the "Attempt" button you can check your results and the expected results to see the differences.
Your code failed for the test case: 3 3 7. According to your code, the result is 116 = (33 + 33 + 77) + 77 ==> your CASE statement checks whether compasses is less than gears and tablets to take it as a minimum value, but here it is equal to gears. CASE statement does the same for the gears, so it goes to the ELSE part to take tablets, which is 7, as minimum, so your code gets 49 instead of 21 for the Step 1.
You should consider the possibility of having 2 equal values that are minimum for the set, as it is the case in 3 compasses, 3 gears, 7 tablets.