Ad
  • Custom User Avatar

    Can someone tell me if my logic is wrong or there is a bug?
    Description says: generate(1,3) should create 3 sets of numbers (for number 1, 2 and 3)
    So logicly generate(1,2) should generate 2 sets of numbers (for 1 and 2)
    but tests in PHP for generate(1,2) wants only 1 set of numbers.

  • Custom User Avatar

    For me it works, if you run print(-3%2) it will return 1 still

  • Custom User Avatar

    Acually it does "Your task is to create a function that..." implies to calculate the solution no "find" a trick to pass the tests (Even sample tests suggests I have to perform calculations). And I get it, I'm new here and assumed ever challenge requires you to write a code, not return one word/number because there is a trick to the challenge. I guess I learned that if challenge is too hard for its rank there may be a trick to it. ( But still author should not be lazy and write a real solution for 536! so I can learn something ;P ) Cheers

  • Custom User Avatar

    No, the challenge does not ask you to do any of this. The method you use to solve is irrelevant (as long as it's not cheating). If you want to solve it by calculating 536! then go ahead, but this challenge can be solved without calculating 536!, in a way which can be deemed 8 kyu.

  • Custom User Avatar

    So this challenge asks you to understand Wilson prime, write Factorial function because your language doesn't have it (D lang) and optimase the function to handle numbers like 536! and it's 8kyu? My last 8kyu asked me to convert int to string.

  • Custom User Avatar

    Now works perfectly! yay, Thank You ;)

  • Custom User Avatar

    Should be fixed. Please check and re-raise if the problem still persists.

  • Custom User Avatar

    I replaced the faulty reference solution with mine and I think it works now. Can you try?

  • Custom User Avatar

    I asked someone to show me D Lang translation Solution.
    I think the line c = 1 << c; should be c = 1UL << c;
    Wihout this it goes over int and wrap around.
    I'm new to this but I'm sure my code is correct and translation is incorrect.

  • Custom User Avatar

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

  • Custom User Avatar

    I had a chance to use foreach_reverse. yay ;)

  • Custom User Avatar

    Good day to practice std.algorithm ;)

  • Custom User Avatar

    Today I learned how to convert decimal number to binary. yay ;)

  • Custom User Avatar

    Every time I do simple kata a learn new think from std.math. Thanks ;)

  • Custom User Avatar

    I feel like I'm learning ;)

  • Loading more items...