Ad
  • Default User Avatar

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

  • Default User Avatar

    I passed all tests, but cannot attempt. Why?

  • Default User Avatar

    Strange with Swift.
    Tests with very large numbers do not pass. In Xcode, for example, the number 35875699062250035 outputs as false. Moreover, if I do print, then the last received number, which is raised to a power, differs by 2 digits - 35875699062250037
    Does anyone know what the problem is?

  • Default User Avatar

    I'm stuck on this with Swift. My code passes all tests except for very large numbers apparently:

    Full Tests
    XCTAssertEqual failed: ("true") is not equal to ("false") - Should return true for 35875699062250035
    XCTAssertEqual failed: ("true") is not equal to ("false") - Should return true for 4498128791164624869
    XCTAssertEqual failed: ("true") is not equal to ("false") - Should return true for 4929273885928088826
    XCTAssertEqual failed: ("true") is not equal to ("false") - Should return true for 21897142587612075
    XCTAssertEqual failed: ("true") is not equal to ("false") - Should return true for 1517841543307505039
    XCTAssertEqual failed: ("true") is not equal to ("false") - Should return true for 35641594208964132
    XCTAssertEqual failed: ("true") is not equal to ("false") - Should return true for 3289582984443187032

    When I logged my output I saw that I have rounding errors, for example:
    9 ^ 19 = 1350851717672992089

    But Swift returns 1350851717672992000

    Has anyone had the same problem? Any tips?

  • Custom User Avatar

    Actual and expected are swapped in PHP, also assertion messages are not filled in completely for all test cases

  • Custom User Avatar

    Hi Julian,

    Would you please be so kind to let me know what you think about the proposal of hardening tests in all languages of this kata so only O(1) solutions pass?

    Thanks!

  • Custom User Avatar

    Hello Everyone. I am trying to solve Java approach for this task. I have prepared my solution and the outcome is rather interesting.

    So during test I pass all possibles. After that, when I take attempt I fail ONLY at one test:

    testRandomWithTriples -> expected:<200> but was:<0>. I consider this is quite fascinating that ALL OTHER TESTS are green, while this one is failing. Also - I am unable to pinpoint possible combination of dices. According to IJ:

    System.out.println("Greedy points = " + greedy(new int[]{1,5,2,3,5}));
    System.out.println("Greedy points = " + greedy(new int[]{2,2,2,4,3}));
    System.out.println("Greedy points = " + greedy(new int[]{5,5,1,2,3}));
    System.out.println("Greedy points = " + greedy(new int[]{1,1,4,2,3}));
    System.out.println("Greedy points = " + greedy(new int[]{2,2,2,2,3}));
    System.out.println("Greedy points = " + greedy(new int[]{2,2,2,2,2}));

    All returns 200.

    Thank you kindly in advance for your help and taking a look in this matter.

  • Custom User Avatar

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

  • Default User Avatar

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

  • Custom User Avatar
  • Custom User Avatar
  • Default User Avatar

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

  • Custom User Avatar

    Nim: no sample tests

  • Default User Avatar

    No random tests in :

    • Javascript (locked tests)
    • Coffeescript
    • C# (locked tests)
  • Custom User Avatar

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

  • Loading more items...