Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Yeah, the code failed for most of the cases cuz i made it exclude non-unique prime factors (my understanding of k-primes definition). Now, it works perfectly, but for one last random test lol.
Thanks for the fast response th.
Tests for C are broken! Please take a look into it! I get this: Expected 2, got 3.
NOTE:
I had the same issue in sample tests what drove me crazy. At the end, I found that the problem is in the first test there were 3 consecutive primes and not 2. Check it yourself:
int a[] = {10081, 10071, 10077, 10065, 10060, 10070, 10086, 10083, 10078, 10076, 10089, 10085, 10063, 10074, 10068, 10073, 10072, 10075};
I am aware that 40 ppl has passed it, but the fact that there is an issue in the sample tests made me frustrated. I debugged the code it passed all sampe tests (after correting the aforementioned one).
Try to add the case when n = 2 ie arr = {1, 4} => 5 and arr {-10, 2}. My code had that bug (since I had to convert it from recursion into iter) and it passed the tests.
careful, tests didn't caught a bug in it (2nd if cond).
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution