Ad
  • Custom User Avatar

    I did read this, and it says an array of subarrays or of tuples or a string

    It doesn't say that you can only return a string, and when I tried to return an array of tuples, it results in errors like this one with the tests:

    Test Failed
    Expected is <System.String>, actual is <System.ValueTuple`2[System.Int64,System.Int64][3]>
    Values differ at index [0]
    Expected: '['
    But was: (1, 1)

    It expects a string in the specific format shown in the tests and returning an array of tuples as the description specifies as an option doesn't work

  • Custom User Avatar

    It is said:
    "We will return an array of subarrays or of tuples (in C an array of Pair) or a string.".
    Did you read that ?
    Furtherrmore you have the following "Sample Tests":
    [Test]
    public void Test01() {
    Assert.AreEqual("[[1, 1], [42, 2500], [246, 84100]]", SumSquaredDivisors.listSquared(1, 250));
    }
    [Test]
    public void Test02() {
    Assert.AreEqual("[[42, 2500], [246, 84100]]", SumSquaredDivisors.listSquared(42, 250));
    }
    [Test]
    public void Test03() {
    Assert.AreEqual("[[287, 84100]]", SumSquaredDivisors.listSquared(250, 500));
    }
    }

  • Custom User Avatar

    In C#, although the kata's description says that you can return an array of tuples/subarrays, you can only return a string and need to manually format it to look like the one in the example.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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