Ad
  • Default User Avatar

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

  • Default User Avatar

    char result[100000] = {0}; -- you create local array. And return pointer to it: return result;. But after you leave the function factors() pointer becomes invalid. Therefore, undefined behavior here.

  • Default User Avatar

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

  • Default User Avatar

    I tried again too, and it works indeed... First time, I didn't remeber that in C cast was implicit in an operation like that, maybe the parentheses I've add (somthing like (int)'f'), or a typo I didn't saw. Anyway, that's my bad, sorry!

  • Default User Avatar

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

  • Default User Avatar

    That's what I tryed first but he told me that I was using a forbiden caracter!? Did they revoke the modulo char? If that's it, they should put it in the forbiden caracters list...

  • Default User Avatar

    free(arr); <-this thing have no sense at all, it will never execute

  • Default User Avatar

    Probably there is problem with range, in C version you are forced to return int where some of the random values are from long long range? Dunno, maybe that`s the fault. Edit: Okay, probably i was wrong. In my code casting the result of log10 function to int before comparing helped to pass the random test. I forgotten to do that, so that was the fault.