Ad
  • Custom User Avatar

    Вычислительная мощность твоего пк != вычислительная мощность той машины, где запускается код с сайта

  • Custom User Avatar

    Fixed. TY for your contribution.

  • Custom User Avatar

    Interesting.. let me look into this. Thanks for finding it.

  • Custom User Avatar

    Fixed for the first one.. will need to look into the second. Thanks for finding this.

  • Custom User Avatar

    in JavaScript I've got such an input in random tests:

    { width: 5, height: 3 }
    [
      [ { x: 1, y: 1 }, { x: 3, y: 1 } ],
      [ { x: 3, y: 1 }, { x: 2, y: 2 } ],
      [ { x: 1, y: 2 }, { x: 1, y: 0 } ],
      [ { x: 1, y: 2 }, { x: 1, y: 1 } ]
    ]
    

    and it tells expected false to equal true
    but when I copied it to sample tests picture clearly shows me that there are no partitions and my answer (false) seems to be correct

  • Custom User Avatar

    instructions;

      s = "I'm JomoPipi" should be "I'm Jomo Pipi" 
    
  • Custom User Avatar

    replace it with the amount of times you've already seen it

    First, English uses amount for the sort of quantities for which you would use real (floating point) numbers. For traditionally countable things, or units of continuously variable things, use the word number. (Examples: an amount of water, a number of bottles of water, an amount of rain, a number of centimeters of rain, a number of raindrops, etc.) As an aside, the same distinction applies to how much vs. how many, with many corresponding to a number.

    Second, "the number of times you've already seen it" starts at zero. because "have already" implies the exclusion of this time. OK, you specifically force the first time to get a 1, but the second time it appears, I have already seen it just once, and yet you expect a 2. It's possibly confusing. From the examples, it becomes obvious, but then also it appears that the distinction between the first occurrence and every following occurrence is unnecessary. The line becomes consistent and agrees with the examples if you only change it to:

    For each character in the string, replace it with the number of times that you have seen this same character [ now | as of now | thus far ] since the beginning of the string.

    and/or something such as

    From the beginning of the given string, change each character's Nth occurrence/appearance to that number N.

    then the examples make clear it means 1-indexed and not 0-indexed.

  • Custom User Avatar

    Прохожу тесты, выводя время выполнения каждого из них, суммирую все полученные значения, получаю 9224. CodeWars даёт: Execution Timed Out (16000 ms), почему 9224 == 16 000 и почему так не считают зарплату? Решал на java

  • Custom User Avatar

    This kata is evil, cool but hard 😥

  • Custom User Avatar

    I found some testcases, where the Codewars environment shows different results than my program:

    number of walls: 6
    walls = (
    [ (Point(6, 2),Point(7, 1))
    , (Point(7, 4),Point(6, 3))
    , (Point(1, 2),Point(3, 0))
    , (Point(2, 1),Point(0, 3))
    , (Point(9, 1),Point(8, 2))
    , (Point(6, 4),Point(7, 5))
    ])
    width = 10
    height = 5
    expected = False
    Your answer: True

    Here the 2 overlapping edges (Point(1, 2),Point(3, 0)) and (Point(2, 1),Point(0, 3)) form a partition with upper and left boundary walls.

    Another testcase:

    number of walls: 11
    walls = (
    [ ((22, 7),(19, 5))
    , ((21, 6),(21, 4))
    , ((24, 7),(24, 6))
    , ((18, 8),(18, 8))
    , ((17, 8),(17, 8))
    , ((23, 8),(24, 9))
    , ((17, 9),(17, 7))
    , ((19, 8),(16, 8))
    , ((16, 9),(14, 9))
    , ((20, 9),(17, 7))
    , ((18, 9),(17, 6))
    ])
    width = 40
    height = 16
    expected = False
    Your answer: True

    There are 2 partitions in the center.

  • Custom User Avatar

    Thank you for this great kata. I learned a lot about how to handle graphs in python.

  • Custom User Avatar
  • Custom User Avatar

    Haskell translation

  • Custom User Avatar

    remember to close your question when it is answered ;-)

  • Custom User Avatar

    Thank you, I was struggling with it and you cleared my mind with that insight!

  • Loading more items...