Ad
  • Custom User Avatar

    Not an issue, and lacking precisions.

  • Custom User Avatar

    The test is fine.

  • Custom User Avatar
    • in what language?
    • with "test" or "attempt"?

    (I thought I already fixed that... :s )

  • Default User Avatar

    For the sample test ("this is a test", 4) , it says that the output should be "this\nis a\ntest" - this is wrong?? Instead should it not be "this\nis\natest"?

  • Default User Avatar

    It always works like that. Just add a print command as the first line of the function, which prints all incoming function parameters.

  • Default User Avatar

    Your code uses the floating point number division operator / instead of // for integer division since python version 3.
    In python versions 2.x / could mean integer division, but this has been changed incompatibly since version 3.
    You must calculate with integers only, not floats. Then it works.
    The problem is that floating point numbers have only limited precision, they can't store verly large integers.
    In python, integers can be as large as you want, but always divide using // to get an integer result.

  • Default User Avatar

    Hi, apologies if this is the wrong forumn, but this happened while I am solving this kata.

    For some reason I noticed my rating (402) is not increasing as I answer questions and submit them corretly? Has anyone else had this problem?

  • Default User Avatar

    You could google "reducing fractions to same denominator".

  • Default User Avatar

    Can someone clarify the test cases for me please- shouldn't [1,2] -> [2,4,] and [1,3] -> [2,6].?? But this seems too easy. My understanding is that for each input pair of integers, we need to find a pair that produce the same fraction when the first element is put on top of the second in a fraction; and we want to reduce D, the second integer of the output pair- is this correct?

  • Custom User Avatar

    the packets with at most 3 digits in this string 0 9026315 -827&()
    is 0 902 631 5 827 Who agree with me ?

    Cal the cubic of each digit and sum up all 0 737 244 125 863
    Then check sum only '0 Lucky'

    i beleive something wrong with test case
    please all help, it is nice kata but tooks me a while to figure it out :) .

  • Custom User Avatar

    the packets with at most 3 digits in this string 0 9026315 -827&()
    is 0 902 631 5 827 Who agree with me ?

    Cal the cubic of each digit and sum up all 0 737 244 125 863
    Then check sum only '0 Lucky'

    i beleive something wrong with test case
    please all help, it is nice kata but tooks me a while to figure it out :) .

  • Custom User Avatar

    See the example in the kata description:

     s = "aqdf&0#1xyz!22[153(777.777" 
       the groups of at most 3 digits are 0 and 1 (one digit), 22 (two digits), 153, 777, 777 (3 digits)
       Only 0, 1, 153 are cubic and their sum is 154
       Return: "0 1 153 154 Lucky"
               n1 ^  ^   ^
                  n2 n3 sum of n1 + n2 + n3
                     
    

    If there is only a single cubic number, the sum is the number itself.

  • Default User Avatar

    I'm still confused, with this logic wouldn't all cubic numbers just be duplicated? But I see for other tests there are some cubic numbers not duplicated in the output. Apologies- I've never struggled to understand a kata as much as this!

  • Custom User Avatar

    why is the output "0 0 Lucky"

    "number1 number2 (and so on if necessary) sumOfCubicNumbers Lucky"

    The only hidden cubic number is 0, the sum is also 0.

  • Default User Avatar

    What??? The input is "0 9026315 -827&()" - what do you mean sumOfCubicNumbers??

  • Loading more items...