OP solved it, closing
You are right. If no number is divisble by that prime number it should be added to the string at the end.
If no number from the array is divisible by a prime factor, then the sum will be equal to 0, or should there not be this pair at all?
It's impossible to answer you without knowing the test case you are refering to.
Can someone tell me why it sould be ..., [ 11, 187 ], [ 13, 0 ], [ 29, -29 ], but shouldn't be ..., [ 11, 187 ], [ 13, 0 ], [ 23, 0 ], ..., [ 29, -29 ] or ..., [ 11, 187 ], [ 23, 0 ], [ 29, -29 ]?
Loading collection data...
OP solved it, closing
You are right. If no number is divisble by that prime number it should be added to the string at the end.
If no number from the array is divisible by a prime factor, then the sum will be equal to 0, or should there not be this pair at all?
It's impossible to answer you without knowing the test case you are refering to.
Can someone tell me why it sould be ..., [ 11, 187 ], [ 13, 0 ], [ 29, -29 ], but shouldn't be ..., [ 11, 187 ], [ 13, 0 ],
[ 23, 0 ], ..., [ 29, -29 ] or ..., [ 11, 187 ], [ 23, 0 ], [ 29, -29 ]?