Ad
  • Custom User Avatar

    i've edited the reply, would you mind reanswer my question.

  • Custom User Avatar

    Neither 3 nor -3 is a factor of -35. Factors of -35 are 1,5,7,35 and, if you count negative factrs too, there are -1,-5,-7,-35. Out of all of these, the only prime numbers are 5 and 7.

  • Custom User Avatar

    what if inpputed number contains -315

    factors of -315 can be [3,3,5,-7] or [-3,3,5,-7] or [3,3,-5,7]

    which the prime factors could be : [3,5], or [3,7] or [3,5,7]

    what do you think about that ?

  • Custom User Avatar

    right, i literally forgot about the answer must be prime numbers.

  • Custom User Avatar

    -5 is not a prime number, so it should not be listed as a prime factor.

  • Custom User Avatar

    Example: I = [15, 30, -45] 5 divides 15, 30 and (-45) so 5 appears in the result, the sum of the numbers for which 5 is a factor is 0 so we have [5, 0] in the result amongst others.

    should the answer be [[5,0] [-5, 45]] ? i don't think 5 and -5 are the same number, but i need to know which one is valid in this kata

    would you guys help confirm this question ?