Ad
  • Custom User Avatar

    The time complexity of the algorithm in this solution is O(n² log n).

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Correct operation of the function in this solution is not guaranteed.

    Input: 1125899940397056 | Expected: 1125899906842624 | Output: 1125899973951489

    Input: 4900000070000000 | Expected: 4900000000000000 | Output: 4900000140000001

    Input: 9007199041343960 | Expected: 9007198946437696 | Output: 9007199136250225

    The total number of such cases (for safe integers) is over 72 million.

  • Custom User Avatar

    This is perhaps the first such integer: 1125899940397056. For this input, the answer should be 1125899906842624, but it gives 1125899973951489.

    And the total number of such safe integers is tens of millions.

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    Input: 117649 | Harmonic mean: 6.000007285602921 | Expected: false | Output: true

    Input: 1953125 | Harmonic mean: 8.000000819200084 | Expected: false | Output: true

    Input: 4782969 | Harmonic mean: 10.000000696917242 | Expected: false | Output: true

    Input: 8388608 | Harmonic mean: 12.00000071525578 | Expected: false | Output: true

  • Custom User Avatar

    Input: 1953125 | Harmonic mean: 8.000000819200084 | Expected: false | Output: true

    Input: 4782969 | Harmonic mean: 10.000000696917242 | Expected: false | Output: true

    Input: 8388608 | Harmonic mean: 12.00000071525578 | Expected: false | Output: true

    Input: 30240 | Harmonic mean: 24 | Expected: true | Output: false

    Input: 1421280 | Harmonic mean: 47 | Expected: true | Output: false

    Input: 1539720 | Harmonic mean: 47 | Expected: true | Output: false

  • Custom User Avatar

    Input: 625 | Harmonic mean: 4.001280409731113 | Expected: false | Output: true

    Input: 4658 | Harmonic mean: 5.000536768652711 | Expected: false | Output: true

    Input: 97903 | Harmonic mean: 7.000071500071501 | Expected: false | Output: true

    Input: 117649 | Harmonic mean: 6.000007285602921 | Expected: false | Output: true

    Input: 30240 | Harmonic mean: 24 | Expected: true | Output: false

    Input: 1421280 | Harmonic mean: 47 | Expected: true | Output: false

    Input: 1539720 | Harmonic mean: 47 | Expected: true | Output: false

  • Custom User Avatar

    Input: 1638 | Harmonic mean: 9 | Expected: true | Output: false

    Input: 18600 | Harmonic mean: 15 | Expected: true | Output: false

    Input: 105664 | Harmonic mean: 13 | Expected: true | Output: false

    Input: 950976 | Harmonic mean: 27 | Expected: true | Output: false

    Input: 4713984 | Harmonic mean: 48 | Expected: true | Output: false

  • Loading more items...