Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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).

  • Custom User Avatar

    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.

  • Custom User Avatar

    careful, tests didn't caught a bug in it (2nd if cond).

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution