Ad
  • Custom User Avatar

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

  • 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

    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 ?