Ad
  • Custom User Avatar

    Yes, the reference solution for java incorrectly checks for exactly 2 sets of 2 cubes that add up to n instead of at least 2 sets of 2 cubes.

  • Custom User Avatar

    I think you need to edit task. There were written: sum of two cubes in two different ways. But in fact the wright solution is: two and more different ways

  • Custom User Avatar

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

  • Custom User Avatar

    Sorry for the misunderstanding, I must've misread the text
    Thanks!

  • Custom User Avatar

    dani is correct, you need to be able to express the number as two different sets of two cubes in order to return true.

  • Custom User Avatar

    The description says to check if the number can be written as the sum of two cubes in two different ways, there's nothing to suggest that it can only be written in two ways.

  • Custom User Avatar

    The description of the kata or the tests need to be corrected.

    To me, the kata asks to check if a number can be written as the sum of two cubes in EXACTLY two ways. But if we test for EXACTLY two pairs, we fail the tests. The tests consider correct a number that can be written as the sum of two cubes in AT LEAST two ways.

  • Custom User Avatar

    I may be reading the text wrong, but the number has to be written as the sum of cubes in two ways. n=a^3+b^3=c^3+d^3, where a,b,c,d are positive and different.

    From what you are saying, for 46163 you've only managed to find a pair of numbers that satisfy that condition

  • Custom User Avatar

    Same here. Hardcoded, but still an issue.

  • Custom User Avatar

    So it was requiring me to return false for 46163, which is 19^3 + 34^3. I hardcoded a workaround, but was anyone else having issues with this?

  • Custom User Avatar

    vos podes no te desalientes

  • Custom User Avatar

    @enji ^^^
    What? I'm not sure what you mean. I am talking about saying "Get sum of nth row for Pascals Triangle" kind of thing. I know it isn't Pascals Triangle. I don't know what this is called.

    @bobthelantern I totally didn't see it lol.

  • Custom User Avatar

    kata hint != kata suggestion.

  • Custom User Avatar

    My only suggestion is a hint to the solution, a link to a mathisfun page or something. I'm not asking for the solution, just a lead. I was looking up this problem for an algorithm I could learn, but I couldn't find anything at all. I don't know how people came up with that solution...

    It just sucks to come up with a plan and finally find your solution, only see that 600+ people solved it in 1 line.

  • Custom User Avatar

    le pongo mucho empeño a aprender, pero siento que no estoy entendiendo nada, sera normal? o mejor renuncio a esto :(

  • Loading more items...