Ad
  • Default User Avatar

    I had the same issue too. The code I have works but will kick the number back if it is too large. Maybe there is some other way you have to solve it?

  • Default User Avatar

    Thanks for the response. What do you think is wrong with the code provided?

  • Custom User Avatar

    I agree with Markus.
    I would recommend adding a sample test with n=25 and m=200. This will result in a condition where m is exactly equal to a multiple of n. Without it, the final test will sometimes pass and sometimes fail because the random test does not always include a scenario where m is an exact multiple of n.

    Assert.AreEqual(700, Kata.SumMul(25, 200));

    I think that change will eliminate the confusion people are encountering.

  • Default User Avatar

    The description is misleading: positivity is not an assumption, it must me validated for by your code.

  • Default User Avatar
  • Default User Avatar

    Hardly an issue. You need better code.

  • Default User Avatar

    I was able to solve the code, but the server timed out a lot when running the tests. It seemed like a lot of the sample tests were working with very large numbers. Maybe that had something to do with it? Not sure.