Ad
  • Custom User Avatar

    What does this sentence mean? "the total number of unique rentals they have made". Should inventory_id be different? But this column wasn't mentioned in (data that is needed for the task). Some rental has more than one payment. Should we sum them?

  • Custom User Avatar

    You misunderstood the behaviour of wrapping (which is, arguably, not described precisely). It is not that when going from positive to negative you always end up with 255. You need to wrap through 255 to lower values, if necessary, so -1 becomes 255, -2 becomes 254, and -12 becomes 244.

  • Custom User Avatar

    L Q Q c U B N
    0 -> 2 -> 4 -> 16 -> (copy = 16) -> 4 -> -12 (=255) -> output 255
    expected:<2[44]> but was:<2[55]>
    Where did I make a mistake?

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

    I get this answer:
    Test Results:
    Random Tests
    cost -- random
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    Test Passed
    make_min_tree -- random
    Test Passed
    Test Passed
    STDERR
    Execution Timed Out (12000 ms)

    How can I understans what is going on?

  • Custom User Avatar

    PowerShell.
    What is a mistake:
    Expected: {0 0.99 0.14 -0.98 -0.28 0.93 0.41 -0.88 -0.54 0.8 0.65 -0.72}
    But was: {0 0.99 0.14 -0.98 -0.28 0.93 0.41 -0.88 -0.54 0.8 0.65 -0.72}
    ?

  • Custom User Avatar

    I try with Powershell:
    Expected string length 231 but was 238. Strings differ at index 25.
    Expected: {Original Balance: 1000.00\n125 Market 125.45 Balance 874.55\n126 Hardware 34.95 Balance 839.60\n127 Video 7.45 Balance 832.15\n128 Book 14.32 Balance 817.83\n129 Gasoline 16.10 Balance 801.73\nTotal expense 198.27\nAverage expense 39.65}
    But was: {Original Balance: 1000.00\n125 Market 125.45 Balance 874.55\n126 Hardware 34.95 Balance 839.60\n127 Video 7.45 Balance 832.15\n128 Book 14.32 Balance 817.83\n129 Gasoline 16.10 Balance 801.73\nTotal expense 198.27\nAverage expense 39.65}

    Expected string length 269 but was 277. Strings differ at index 22.
    Expected: {Original Balance: 1822\n122 Hairdresser 128.00 Balance 1694.00\n139 Picture 17.6 Balance 1676.40\n130 Stamps 24.8 Balance 1651.60\n128 Pen 3.2 Balance 1648.40\n003 Market 19.00 Balance 1629.40\n160 Vegetables 11.00 Balance 1618.40\nTotal expense 203.60\nAverage expense 33.93}
    But was: {Original Balance: 1822\n122 Hairdresser 128.00 Balance 1694.00\n139 Picture 17.6 Balance 1676.40\n130 Stamps 24.8 Balance 1651.60\n128 Pen 3.2 Balance 1648.40\n003 Market 19.00 Balance 1629.40\n160 Vegetables 11.00 Balance 1618.40\nTotal expense 203.60\nAverage expense 33.93}

    Where is the difference? I compared it symbol by symbol.

  • Custom User Avatar

    Description says bakers are numbered 1 to N but Java tests generates portraits with number 0

  • Custom User Avatar

    Is it possible to create algoritm less than n^2?

  • Custom User Avatar

    What does it mean:
    Test Results:
    diagonal
    Fixed Tests
    Should Pass Fixed Tests
    Expected: {101}
    But was: {101}
    Stack Trace
    Completed in 756ms
    Completed in 756ms
    Random Tests
    Should pass Random Tests
    Expected: {2760681}
    But was: {2760681}
    I try to use PowerShell, but can't pass the test.

  • Default User Avatar

    When you see these numbers, the 2nd is the total number of solves shared across all languages and the first is the number of solves in your language (PowerShell). So there have been 14 people solving this kata in PS, while - for example - 2958 in Python.

    edit - I scrolled down to find the author of the PowerShell translation but it seems the user has deleted their profile:

    https://www.codewars.com/kata/555624b601231dc7a400017a/discuss#5dd0a63797512c001dc87f0b

    since it's a niche language, if you don't get a PowerShell user to help you on here your best bet would be to check the Codewars discord if you think there's a problem with the translation.

  • Custom User Avatar

    I see for PowerShell:
    14 of 11,796
    Is it possible to pass this kata in PS?