Ad
  • Custom User Avatar

    Thanks for the clarification. Seems I misunderstood the problem instructions.

  • Custom User Avatar

    In Prolog, when running the test cases for the 'range' predicates, the tests are returning a list of a list instead of a single list. For example, for range(5), I would expect the result to be [1, 2, 3, 4, 5], but the test returns [[1, 2, 3, 4, 5]].

    It seems the issue lies in how the 'findall/3' predicate is used within the tests. It actually collects the resulting list of the 'range' predicates in another list.

  • Custom User Avatar

    In C, when I print the registers[] array inside the function, the output matches the expected results exactly (at least when running the first test cases). Despite this, the tests still fail, showing that the registers are zero, not matching the expected output. What is the correct way to modify the array, so that the test framework correctly evaluates the results?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution