You need to find the prime factors of all elements of I, then produce the sum of all elements of I that share that prime factor: [(prime factor p1, sum of all elements of I with prime factor p), (prime factor p2, sum of all elements of I with prime factor p2), ...]
Those 3 can become [1,11], but you have there [10,20] too, and in the end, all of them become [1,20].
Thanks! :D.
@kingcobra_
You need to find the prime factors of all elements of
I
, then produce the sum of all elements ofI
that share that prime factor:[(prime factor p1, sum of all elements of I with prime factor p), (prime factor p2, sum of all elements of I with prime factor p2), ...]
i actually didnt understand the kata.
is it like finding the factor of a number which is prime?
Yes, that's why you get [3, 27 = 12 + 15] and [5, 15]
but 5 and 3 are prime factors of 15 right
6 is not a prime number.
https://docs.codewars.com/training/troubleshooting#print-input