Ad
  • Custom User Avatar

    Since 4-2-2 contains 2 distinct sets, you have 2*7=14 points from step 1 where your organization is right.
    However, there is a difference between the square of 4 and the sum of the squares of 3 and 1. That's why you shouldn't organize 4-2-2 as 1-1-1 and 3-1-1.
    Test calculates the sum of the squares of 4, 2, and 2 which is 24.
    So the result is 14 + 24 = 38 points.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    I didn't get what is the point of such long calculations that results 0 in </n*2-2+(1-1 + 2-2 + 3-3 + 4-4 + 5+6-11)/>?