Ad
  • Custom User Avatar

    done

  • Custom User Avatar

    My, what crypic coding. I'm happy I don't have to maintain this code...

  • Default User Avatar

    its still pretty difficult to understand for me, but i think i got your point. thank you for the reply, and once again congrats for your code.

  • Custom User Avatar

    hehe that's not assembly/machine code... that is just a char replacement table for rot13, but instead of defining it with bytes/chars which would make it bigger/obvious... i defined them using 64bit unsigned integers... i.e. each pair of hex digits correspond to a byte... hence why when i access it i cast the pointer to char* to access it as a regular char table.

    either way it's possible to have machine code defined in an array and call it just like you would call a dynamic loaded function... i.e. with a function pointer pointing to the array. (normally this array have to be as local in the stack, because there's read/write/exec permissions for the stack, otherwise system specific functions would need to be called to set the exec privileges)

  • Default User Avatar

    please, can you explain to me how you manage to create a program in c using exadecimal and binary stuff from assembly language? im so amazed

  • Custom User Avatar

    Just curious about how you define those weights?

  • Default User Avatar

    Couldn't agree more, we aren't Math majors here.

  • Custom User Avatar

    I forgot about truncation (facepalm).

    Great solution!

  • Custom User Avatar

    hehe i manually adjusted the precision to overcome rounding errors... i guess the -0.25 is a hack to make the answer fit

  • Default User Avatar

    that's really clever, i'm not good at maths so i didnt know of the gamma function
    i'm guessing this solution works on platforms that use 80 bit long doubles ?
    what is the -0.25 for ?

  • Default User Avatar

    added to the description, thanks :)

  • Default User Avatar

    Description is not clever, Thanks for the pic, It helps me to understand the question, but anyway I solved this question by finding the pattern.

  • Custom User Avatar

    no, otherwise it would be pointless to have kata's marked with "mathematics", fundamentals are fundamentals concept in programming, and this kata was entirely based on a math principle (its solving a math problem).

  • Default User Avatar

    Aren't mathematics fundamental?

  • Custom User Avatar

    My method was pretty possibly the most brute forcey you could go. I wrote an equation to find which numbers let you skip, but didn't condense it appropriately. Also, it doesn't always work. Once I finished, I resubmitted some odd 20 times to get lucky numbers.

  • Loading more items...